X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2Fpackagist%2Fpiedsjaloux-ckeditor-component.git;a=blobdiff_plain;f=sources%2Fcore%2Fscriptloader.js;fp=sources%2Fcore%2Fscriptloader.js;h=356996fb55829950d2be90a51568dacf827aad02;hp=9ad536e5bd8778afe4d4e00459b2559a7bb62fdb;hb=317f8f8f0651488f226b5280a8f036c7c135c639;hpb=1096cdefb1c9a3f3c4ca6807e272da6c92e5ed9c diff --git a/sources/core/scriptloader.js b/sources/core/scriptloader.js index 9ad536e..356996f 100644 --- a/sources/core/scriptloader.js +++ b/sources/core/scriptloader.js @@ -1,5 +1,5 @@ /** - * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or http://ckeditor.com/license */ @@ -119,8 +119,8 @@ CKEDITOR.scriptLoader = ( function() { } ); if ( callback ) { - if ( CKEDITOR.env.ie && CKEDITOR.env.version < 11 ) { - // FIXME: For IE, we are not able to return false on error (like 404). + // The onload or onerror event does not fire in IE8 and IE9 Quirks Mode (http://dev.ckeditor.com/ticket/14849). + if ( CKEDITOR.env.ie && ( CKEDITOR.env.version <= 8 || CKEDITOR.env.ie9Compat ) ) { script.$.onreadystatechange = function() { if ( script.$.readyState == 'loaded' || script.$.readyState == 'complete' ) { script.$.onreadystatechange = null; @@ -130,13 +130,12 @@ CKEDITOR.scriptLoader = ( function() { } else { script.$.onload = function() { // Some browsers, such as Safari, may call the onLoad function - // immediately. Which will break the loading sequence. (#3661) + // immediately. Which will break the loading sequence. (http://dev.ckeditor.com/ticket/3661) setTimeout( function() { onLoad( url, true ); }, 0 ); }; - // FIXME: Opera and Safari will not fire onerror. script.$.onerror = function() { onLoad( url, false ); };