Traversing: simplify jQuery#contents method

Ref 90d7cc1d8b
Ref gh-1961
This commit is contained in:
Oleg Gaidarenko 2014-12-21 23:01:11 +03:00
parent 3dcee02160
commit 7230df15ac

View File

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