Revert "Traversing: simplify jQuery#contents method"

This reverts commit 7230df15ac.
This commit is contained in:
Oleg Gaidarenko 2015-12-22 17:29:42 +03:00
parent 7c0982029f
commit c463327a5d

View File

@ -142,7 +142,9 @@ jQuery.each( {
return siblings( elem.firstChild );
},
contents: function( elem ) {
return elem.contentDocument || jQuery.merge( [], elem.childNodes );
return jQuery.nodeName( elem, "iframe" ) ?
elem.contentDocument || elem.contentWindow.document :
jQuery.merge( [], elem.childNodes );
}
}, function( name, fn ) {
jQuery.fn[ name ] = function( until, selector ) {