]> source.dussan.org Git - jquery.git/commit
Core: Fire iframe script in its context, add doc param in globalEval
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Mon, 10 Feb 2020 18:17:22 +0000 (19:17 +0100)
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Mon, 10 Feb 2020 18:20:50 +0000 (19:20 +0100)
commit3dedc3f2d46d38296f6867ca69c970e512f87e16
tree164151135f6053854c3c40b8d8c53108121e0e58
parentd525ae3416417186330bb3d14133df84509803a0
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)
src/core.js
src/manipulation.js
src/manipulation/_evalUrl.js
test/data/core/globaleval-context.html [new file with mode: 0644]
test/data/manipulation/set-global-scripttest.js [new file with mode: 0644]
test/data/testinit.js
test/unit/core.js
test/unit/manipulation.js