From: Oleg Gaidarenko Date: Sun, 21 Dec 2014 20:01:11 +0000 (+0300) Subject: Traversing: simplify jQuery#contents method X-Git-Tag: 3.0.0-alpha1+compat~165 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7230df15ac612e0e5a08ed7ffc02f6700b2ec898;p=jquery.git Traversing: simplify jQuery#contents method Ref 90d7cc1d8b2ea7ac75f0eacb42439349c9c73278 Ref gh-1961 --- diff --git a/src/traversing.js b/src/traversing.js index 2943987a1..9f3de7af1 100644 --- a/src/traversing.js +++ b/src/traversing.js @@ -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 ) {