Commit bc1902dd authored by Bin Xin's avatar Bin Xin Committed by Oleg Gaidarenko

Manipulation: support data-URI scripts insertion

Ref 15f4dec7894f1e00adbfb9bce4f870441a527bd6
parent fa70df69
...@@ -7,6 +7,7 @@ jQuery._evalUrl = function( url ) { ...@@ -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
......
...@@ -2461,3 +2461,12 @@ test( "Make sure jQuery.fn.remove can work on elements in documentFragment", 1, ...@@ -2461,3 +2461,12 @@ test( "Make sure jQuery.fn.remove can work on elements in documentFragment", 1,
equal( fragment.childNodes.length, 0, "div element was removed from documentFragment" ); equal( fragment.childNodes.length, 0, "div element was removed from documentFragment" );
}); });
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 );
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment