From c463327a5d0f6d84c14d1d69f794f574e0cbcfd4 Mon Sep 17 00:00:00 2001 From: Oleg Gaidarenko Date: Tue, 22 Dec 2015 17:29:42 +0300 Subject: [PATCH] Revert "Traversing: simplify jQuery#contents method" This reverts commit 7230df15ac612e0e5a08ed7ffc02f6700b2ec898. --- src/traversing.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/traversing.js b/src/traversing.js index addc79080..5b0b1a02b 100644 --- a/src/traversing.js +++ b/src/traversing.js @@ -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 ) { -- 2.39.5