mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Manipulation: support data-URI scripts insertion
Fixes gh-1887 Closes gh-1888
This commit is contained in:
parent
7d15b4d1f1
commit
15f4dec789
@ -7,6 +7,7 @@ jQuery._evalUrl = function( url ) {
|
|||||||
url: url,
|
url: url,
|
||||||
type: "GET",
|
type: "GET",
|
||||||
dataType: "script",
|
dataType: "script",
|
||||||
|
cache: true,
|
||||||
async: false,
|
async: false,
|
||||||
global: false,
|
global: false,
|
||||||
"throws": true
|
"throws": true
|
||||||
|
@ -2434,3 +2434,12 @@ test( "Validate creation of multiple quantities of certain elements (#13818)", 4
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
asyncTest( "Insert script with data-URI (gh-1887)", 1, function() {
|
||||||
|
Globals.register( "testFoo" );
|
||||||
|
jQuery( "#qunit-fixture" ).append( "<script src=\"data:text/javascript,testFoo = 'foo';\"></script>" );
|
||||||
|
setTimeout(function() {
|
||||||
|
strictEqual( window[ "testFoo" ], "foo", "data-URI script executed" );
|
||||||
|
start();
|
||||||
|
}, 100 );
|
||||||
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user