File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22// @require ./cash.js
33// @require ./variables.js
44// @require ./type_checking.js
5+ // @require collection/get.js
6+ // @require manipulation/detach.js
57
68let fragment ;
79
@@ -17,7 +19,7 @@ function parseHTML ( html ) { //FIXME: `<tr></tr>` can't be parsed with this
1719 initFragment ( ) ;
1820 if ( ! isString ( html ) ) html = '' ;
1921 fragment . body . innerHTML = html ;
20- return slice . call ( fragment . body . childNodes ) ;
22+ return $ ( fragment . body . childNodes ) . detach ( ) . get ( ) ;
2123}
2224
2325cash . parseHTML = parseHTML ;
Original file line number Diff line number Diff line change @@ -835,6 +835,10 @@ QUnit.test( "$.matches", function( assert ) {
835835
836836QUnit . test ( "$.parseHTML" , function ( assert ) {
837837 assert . equal ( $ . parseHTML ( '<a></a>' ) [ 0 ] . outerHTML , '<a></a>' , "$.parseHTML Passed!" ) ;
838+
839+ var span = $ ( '<span>CONTENT</span>' ) ;
840+ $ ( '<div></div>' ) ;
841+ assert . equal ( span . html ( ) , 'CONTENT' , '$.parseHTML doesn\'t overwrite the content' ) ;
838842} ) ;
839843
840844QUnit . test ( "$.prefixedProp" , function ( assert ) {
You can’t perform that action at this time.
0 commit comments