Manipulation: don't test data-URI with script element in IE8

Since, apparently, it doesn't support it. Couldn't find more relevant info
then this - http://msdn.microsoft.com/en-us/library/cc848897(v=vs.85).aspx

No guard for older IE, since support for them will be removed soon anyway
This commit is contained in:
Oleg Gaidarenko
2014-12-03 12:35:21 +03:00
parent bc1902ddc0
commit 503e54564a

View File

@@ -2462,11 +2462,15 @@ test( "Make sure jQuery.fn.remove can work on elements in documentFragment", 1,
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 );
});
// IE8 doesn't support data-URI in src attribute of script element
// Relevant - http://msdn.microsoft.com/en-us/library/cc848897(v=vs.85).aspx
if ( !/msie 8\.0/i.test( navigator.userAgent ) ) {
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 );
});
}