@@ -1981,8 +1981,6 @@ this.createjs = this.createjs || {};
19811981 // public methods
19821982 p . load = function ( ) {
19831983 this . _tag . onload = createjs . proxy ( this . _handleTagComplete , this ) ;
1984- this . _tag . onreadystatechange = createjs . proxy ( this . _handleReadyStateChange , this ) ;
1985- this . _tag . onerror = createjs . proxy ( this . _handleError , this ) ;
19861984
19871985 var evt = new createjs . Event ( "initialize" ) ;
19881986 evt . loader = this . _tag ;
@@ -2001,33 +1999,6 @@ this.createjs = this.createjs || {};
20011999 } ;
20022000
20032001 // private methods
2004- /**
2005- * Handle the readyStateChange event from a tag. We need this in place of the `onload` callback (mainly SCRIPT
2006- * and LINK tags), but other cases may exist.
2007- * @method _handleReadyStateChange
2008- * @private
2009- */
2010- p . _handleReadyStateChange = function ( ) {
2011- clearTimeout ( this . _loadTimeout ) ;
2012- // This is strictly for tags in browsers that do not support onload.
2013- var tag = this . _tag ;
2014-
2015- // Complete is for old IE support.
2016- if ( tag . readyState == "loaded" || tag . readyState == "complete" ) {
2017- this . _handleTagComplete ( ) ;
2018- }
2019- } ;
2020-
2021- /**
2022- * Handle any error events from the tag.
2023- * @method _handleError
2024- * @protected
2025- */
2026- p . _handleError = function ( ) {
2027- this . _clean ( ) ;
2028- this . dispatchEvent ( "error" ) ;
2029- } ;
2030-
20312002 /**
20322003 * Handle the tag's onload callback.
20332004 * @method _handleTagComplete
@@ -3194,46 +3165,12 @@ this.createjs = this.createjs || {};
31943165 } // This loader no longer exists
31953166 this . _loadedScripts [ index ] = ( loadFailed === true ) ? true : item ;
31963167
3197- this . _checkScriptLoadOrder ( ) ;
31983168 return true ;
31993169 }
32003170
32013171 return false ;
32023172 } ;
32033173
3204- /**
3205- * Ensure the scripts load and dispatch in the correct order. When using XHR, scripts are stored in an array in the
3206- * order they were added, but with a "null" value. When they are completed, the value is set to the load item,
3207- * and then when they are processed and dispatched, the value is set to `true`. This method simply
3208- * iterates the array, and ensures that any loaded items that are not preceded by a `null` value are
3209- * dispatched.
3210- * @method _checkScriptLoadOrder
3211- * @private
3212- */
3213- p . _checkScriptLoadOrder = function ( ) {
3214- var l = this . _loadedScripts . length ;
3215-
3216- for ( var i = 0 ; i < l ; i ++ ) {
3217- var item = this . _loadedScripts [ i ] ;
3218- if ( item === null ) {
3219- break ;
3220- } // This is still loading. Do not process further.
3221- if ( item === true ) {
3222- continue ;
3223- } // This has completed, and been processed. Move on.
3224-
3225- var loadItem = this . _loadedResults [ item . id ] ;
3226- if ( item . type == createjs . Types . JAVASCRIPT ) {
3227- // Append script tags to the head automatically.
3228- createjs . DomUtils . appendToHead ( loadItem ) ;
3229- }
3230-
3231- var loader = item . _loader ;
3232- this . _processFinishedLoad ( item , loader ) ;
3233- this . _loadedScripts [ i ] = true ;
3234- }
3235- } ;
3236-
32373174 /**
32383175 * A file has completed loading, and the LoadQueue can move on. This triggers the complete event, and kick-starts
32393176 * the next item.
0 commit comments