]> source.dussan.org Git - jquery.git/commitdiff
Simplification of jQuery#contents method
authorOleg <markelog@gmail.com>
Sun, 26 May 2013 11:20:47 +0000 (15:20 +0400)
committerDave Methvin <dave.methvin@gmail.com>
Mon, 27 May 2013 15:21:28 +0000 (11:21 -0400)
src/traversing.js

index b5a38f3635a0bf8b62c91767174cdf38b5e45ece..8e305c289aa7bf1450f7a9332913b820ba3b3809 100644 (file)
@@ -179,9 +179,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 ) {