From: Oleg Gaidarenko Date: Wed, 3 Dec 2014 09:35:21 +0000 (+0300) Subject: Manipulation: don't test data-URI with script element in IE8 X-Git-Tag: 3.0.0-alpha1+compat~198 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=503e54564a8a88b7e968b64a920f2eeceffb0b74;p=jquery.git 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 --- diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index f4918b59a..7e38d25af 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -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( "" ); - 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( "" ); + setTimeout(function (){ + strictEqual( window[ "testFoo" ], "foo", "data-URI script executed" ); + start(); + }, 100 ); + }); +}