Changeset 4014
- Timestamp:
- 12/04/07 19:37:03 (1 year ago)
- Location:
- trunk/jquery
- Files:
-
- 2 modified
-
src/core.js (modified) (1 diff)
-
test/unit/core.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/jquery/src/core.js
r4013 r4014 918 918 var ret = []; 919 919 context = context || document; 920 if (!context.createElement) 921 context = context.ownerDocument || context[0] && context[0].ownerDocument || document; 920 922 921 923 jQuery.each(elems, function(i, elem){ -
trunk/jquery/test/unit/core.js
r4013 r4014 13 13 14 14 test("$()", function() { 15 expect( 5);15 expect(4); 16 16 17 17 var main = $("#main"); 18 18 isSet( $("div p", main).get(), q("sndp", "en", "sap"), "Basic selector with jQuery object as context" ); 19 19 20 /* 21 // disabled since this test was doing nothing. i tried to fix it but i'm not sure 22 // what the expected behavior should even be. FF returns "\n" for the text node 20 23 // make sure this is handled 21 $('<p>\r\n</p>'); 22 ok( true, "Check for \\r and \\n in jQuery()" ); 24 var crlfContainer = $('<p>\r\n</p>'); 25 var x = crlfContainer.contents().get(0).nodeValue; 26 equals( x, what???, "Check for \\r and \\n in jQuery()" ); 27 */ 23 28 24 29 /* // Disabled until we add this functionality in … … 149 154 test("$('html')", function() { 150 155 expect(4); 151 156 152 157 reset(); 153 158 foo = false; … … 162 167 163 168 reset(); 169 }); 170 171 test("$('html', context)", function() { 172 expect(1); 173 174 var $div = $("<div/>"); 175 var $span = $("<span/>", $div); 176 equals($span.length, 1, "Verify a span created with a div context works"); 164 177 }); 165 178
