]> source.dussan.org Git - jquery.git/commitdiff
Traversing: simplify jQuery#contents method
authorOleg Gaidarenko <markelog@gmail.com>
Sun, 21 Dec 2014 20:01:11 +0000 (23:01 +0300)
committerOleg Gaidarenko <markelog@gmail.com>
Tue, 23 Dec 2014 23:45:56 +0000 (02:45 +0300)
Ref 90d7cc1d8b2ea7ac75f0eacb42439349c9c73278
Ref gh-1961

src/traversing.js

index 2943987a1b36fa23fecdaa0464954ee62ea906fb..9f3de7af10c6b010717a3d4d186319484c8fc01d 100644 (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 ) {