return path;\r
})();\r
\r
- var timestamp = 'A06B';\r
+ var timestamp = 'A4SD49Y';\r
\r
var getUrl = function( resource )\r
{\r
\r
// We must guarantee the execution order of the scripts, so we\r
// need to load them one by one. (#4145)\r
- // The followin if/else block has been taken from the scriptloader core code.\r
- if ( CKEDITOR.env.ie )\r
+ // The following if/else block has been taken from the scriptloader core code.\r
+ if ( typeof(script.onreadystatechange) !== "undefined" )\r
{\r
/** @ignore */\r
script.onreadystatechange = function()\r
\r
/**\r
* Loads a specific script, including its dependencies. This is not a\r
- * synchronous loading, which means that the code the be loaded will\r
+ * synchronous loading, which means that the code to be loaded will\r
* not necessarily be available after this call.\r
* @example\r
* CKEDITOR.loader.load( 'core/dom/element' );\r
var scriptSrc = getUrl( '_source/' + scriptName + '.js' );\r
\r
// Append the <script> element to the DOM.\r
- if ( document.body )\r
+ // If the page is fully loaded, we can't use document.write\r
+ // but if the script is run while the body is loading then it's safe to use it\r
+ // Unfortunately, Firefox <3.6 doesn't support document.readyState, so it won't get this improvement\r
+ if ( document.body && (!document.readyState || document.readyState == 'complete') )\r
{\r
pendingLoad.push( scriptName );\r
\r