aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Gaidarenko <markelog@gmail.com>2015-11-13 19:49:10 +0300
committerOleg Gaidarenko <markelog@gmail.com>2015-11-13 20:06:18 +0300
commit741fe39ac874ee585c7d762dc7272386841827b8 (patch)
treef3096d2e1078ae9eaab5745894821a9b154af692
parent91acd85b167e39e05e8f4fb1be6f75cdcac9c466 (diff)
downloadjquery-741fe39ac874ee585c7d762dc7272386841827b8.tar.gz
jquery-741fe39ac874ee585c7d762dc7272386841827b8.zip
Revert "Manipulation: execute scripts from iframe in the iframe's context"
This reverts commit 22449eb968622c2e14d6c8d8de2cf1e1ba4adccd.
-rw-r--r--src/manipulation.js2
-rw-r--r--test/data/manipulation/scripts-context.html18
-rw-r--r--test/unit/manipulation.js11
3 files changed, 1 insertions, 30 deletions
diff --git a/src/manipulation.js b/src/manipulation.js
index eaf2e0998..ceb970cbd 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -192,7 +192,7 @@ function domManip( collection, args, callback, ignored ) {
jQuery._evalUrl( node.src );
}
} else {
- jQuery.globalEval( node.textContent.replace( rcleanScript, "" ), doc );
+ jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) );
}
}
}
diff --git a/test/data/manipulation/scripts-context.html b/test/data/manipulation/scripts-context.html
deleted file mode 100644
index 6958453c5..000000000
--- a/test/data/manipulation/scripts-context.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset=utf-8 />
- <title>body</title>
- </head>
- <body>
- <div id="qunit-fixture"></div>
- <script src="../../jquery.js"></script>
- <script>
- window.parent.iframeCallback(
- window,
- document.body,
- "<script>window.scriptTest = true;<\x2fscript>"
- );
- </script>
- </body>
-</html>
diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js
index e62eae16b..050853bf5 100644
--- a/test/unit/manipulation.js
+++ b/test/unit/manipulation.js
@@ -2183,17 +2183,6 @@ testIframeWithCallback(
}
);
-testIframeWithCallback(
- "domManip executes scripts in iframes in the iframes' context",
- "manipulation/scripts-context.html",
- function( frameWindow, bodyElement, html, assert ) {
- assert.expect( 2 );
- jQuery( bodyElement ).append( html );
- assert.ok( !window.scriptTest, "script executed in iframe context" );
- assert.ok( frameWindow.scriptTest, "script executed in iframe context" );
- }
-);
-
QUnit.test( "jQuery.clone - no exceptions for object elements #9587", function( assert ) {
assert.expect( 1 );