Manipulation: support data-URI scripts insertion

Fixes gh-1887
Closes gh-1888
This commit is contained in:
Bin Xin 2014-11-28 14:09:29 +08:00 committed by Oleg Gaidarenko
parent 7d15b4d1f1
commit 15f4dec789
2 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -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 );
});