Commit 0cc806fd authored by timmywil's avatar timmywil

Update Sizzle. Adds document to acceptable nodeTypes for .text(). Fixes #10724.

parent cc4a9996
Subproject commit d4e5c22e7ee8aa5751fc8d4d4f21d7ed5ff04a49 Subproject commit 2e664828f3e0a17d70ef4bf69322e06da04eb406
...@@ -7,12 +7,13 @@ var bareObj = function(value) { return value; }; ...@@ -7,12 +7,13 @@ 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(2); expect(3);
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." );
// Check serialization of text values // Check serialization of text values
equal( jQuery(document.createTextNode("foo")).text(), "foo", "Text node was retreived from .text()." ); equal( jQuery(document.createTextNode("foo")).text(), "foo", "Text node was retreived from .text()." );
notEqual( jQuery(document).text(), "", "Retrieving text for the document retrieves all text (#10724).");
}); });
var testText = function(valueObj) { var testText = function(valueObj) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment