@@ -1981,8 +1981,6 @@ this.createjs = this.createjs || {};
1981
1981
// public methods
1982
1982
p . load = function ( ) {
1983
1983
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 ) ;
1986
1984
1987
1985
var evt = new createjs . Event ( "initialize" ) ;
1988
1986
evt . loader = this . _tag ;
@@ -2001,33 +1999,6 @@ this.createjs = this.createjs || {};
2001
1999
} ;
2002
2000
2003
2001
// 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
-
2031
2002
/**
2032
2003
* Handle the tag's onload callback.
2033
2004
* @method _handleTagComplete
@@ -3194,46 +3165,12 @@ this.createjs = this.createjs || {};
3194
3165
} // This loader no longer exists
3195
3166
this . _loadedScripts [ index ] = ( loadFailed === true ) ? true : item ;
3196
3167
3197
- this . _checkScriptLoadOrder ( ) ;
3198
3168
return true ;
3199
3169
}
3200
3170
3201
3171
return false ;
3202
3172
} ;
3203
3173
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
-
3237
3174
/**
3238
3175
* A file has completed loading, and the LoadQueue can move on. This triggers the complete event, and kick-starts
3239
3176
* the next item.
0 commit comments