aboutsummaryrefslogtreecommitdiffstats
path: root/src/manipulation
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2020-02-10 19:17:22 +0100
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2020-02-10 19:20:50 +0100
commit3dedc3f2d46d38296f6867ca69c970e512f87e16 (patch)
tree164151135f6053854c3c40b8d8c53108121e0e58 /src/manipulation
parentd525ae3416417186330bb3d14133df84509803a0 (diff)
downloadjquery-3dedc3f2d46d38296f6867ca69c970e512f87e16.tar.gz
jquery-3dedc3f2d46d38296f6867ca69c970e512f87e16.zip
Core: Fire iframe script in its context, add doc param in globalEval
1. Support passing custom document to jQuery.globalEval; the script will be invoked in the context of this document. 2. Fire external scripts appended to iframe contents in that iframe context; this was already supported & tested for inline scripts but not for external ones. Fixes gh-4518 Closes gh-4601 (cherry picked from commit 4592595b478be979141ce35c693dbc6b65647173)
Diffstat (limited to 'src/manipulation')
-rw-r--r--src/manipulation/_evalUrl.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/manipulation/_evalUrl.js b/src/manipulation/_evalUrl.js
index 9a4d2ac6f..6163b68c4 100644
--- a/src/manipulation/_evalUrl.js
+++ b/src/manipulation/_evalUrl.js
@@ -4,7 +4,7 @@ define( [
"use strict";
-jQuery._evalUrl = function( url, options ) {
+jQuery._evalUrl = function( url, options, doc ) {
return jQuery.ajax( {
url: url,
@@ -22,7 +22,7 @@ jQuery._evalUrl = function( url, options ) {
"text script": function() {}
},
dataFilter: function( response ) {
- jQuery.globalEval( response, options );
+ jQuery.globalEval( response, options, doc );
}
} );
};