Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
a29d4828
Commit
a29d4828
authored
Mar 30, 2012
by
timmywil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Sizzle and add test for sizzle getText fix. Removes usage of innerText. Fixes #11153.
parent
c68f4fe5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
sizzle
src/sizzle
+1
-1
manipulation.js
test/unit/manipulation.js
+5
-1
No files found.
sizzle
@
feebbd7e
Subproject commit fe
2f618106bb76857b229113d6d11653707d0b22
Subproject commit fe
ebbd7e053bff426444c7b348c776c99c7490ee
test/unit/manipulation.js
View file @
a29d4828
...
@@ -7,7 +7,7 @@ var bareObj = function(value) { return value; };
...
@@ -7,7 +7,7 @@ var bareObj = function(value) { return value; };
var
functionReturningObj
=
function
(
value
)
{
return
(
function
()
{
return
value
;
});
};
var
functionReturningObj
=
function
(
value
)
{
return
(
function
()
{
return
value
;
});
};
test
(
"text()"
,
function
()
{
test
(
"text()"
,
function
()
{
expect
(
4
);
expect
(
5
);
var
expected
=
"This link has class=
\"
blog
\"
: Simon Willison's Weblog"
;
var
expected
=
"This link has class=
\"
blog
\"
: Simon Willison's Weblog"
;
equal
(
jQuery
(
"#sap"
).
text
(),
expected
,
"Check for merged text of more then one element."
);
equal
(
jQuery
(
"#sap"
).
text
(),
expected
,
"Check for merged text of more then one element."
);
...
@@ -20,6 +20,10 @@ test("text()", function() {
...
@@ -20,6 +20,10 @@ test("text()", function() {
frag
.
appendChild
(
document
.
createTextNode
(
"foo"
)
);
frag
.
appendChild
(
document
.
createTextNode
(
"foo"
)
);
equal
(
jQuery
(
frag
).
text
(),
"foo"
,
"Document Fragment Text node was retreived from .text()."
);
equal
(
jQuery
(
frag
).
text
(),
"foo"
,
"Document Fragment Text node was retreived from .text()."
);
var
$newLineTest
=
jQuery
(
"<div>test<br/>testy</div>"
).
appendTo
(
"#moretests"
);
$newLineTest
.
find
(
"br"
).
replaceWith
(
"
\n
"
);
equal
(
$newLineTest
.
text
(),
"test
\n
testy"
,
"text() does not remove new lines (#11153)"
);
});
});
test
(
"text(undefined)"
,
function
()
{
test
(
"text(undefined)"
,
function
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment