/*\r
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\r
\r
// Table of script names and their dependencies.\r
var scripts =\r
{\r
- 'core/_bootstrap' : [ 'core/config', 'core/ckeditor', 'core/plugins', 'core/scriptloader', 'core/tools', /* The following are entries that we want to force loading at the end to avoid dependence recursion */ 'core/dom/elementpath', 'core/dom/text', 'core/dom/range' ],\r
+ 'core/_bootstrap' : [ 'core/config', 'core/ckeditor', 'core/plugins', 'core/scriptloader', 'core/tools', /* The following are entries that we want to force loading at the end to avoid dependence recursion */ 'core/dom/comment', 'core/dom/elementpath', 'core/dom/text', 'core/dom/range' ],\r
'core/ajax' : [ 'core/xml' ],\r
'core/ckeditor' : [ 'core/ckeditor_basic', 'core/dom', 'core/dtd', 'core/dom/document', 'core/dom/element', 'core/editor', 'core/event', 'core/htmlparser', 'core/htmlparser/element', 'core/htmlparser/fragment', 'core/htmlparser/filter', 'core/htmlparser/basicwriter', 'core/tools' ],\r
'core/ckeditor_base' : [],\r
'core/command' : [],\r
'core/config' : [ 'core/ckeditor_base' ],\r
'core/dom' : [],\r
+ 'core/dom/comment' : [ 'core/dom/node' ],\r
'core/dom/document' : [ 'core/dom', 'core/dom/domobject', 'core/dom/window' ],\r
'core/dom/documentfragment' : [ 'core/dom/element' ],\r
'core/dom/element' : [ 'core/dom', 'core/dom/document', 'core/dom/domobject', 'core/dom/node', 'core/dom/nodelist', 'core/tools' ],\r
return path;\r
})();\r
\r
- var timestamp = '9BIB';\r
+ var timestamp = 'A5AB4B6';\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