1 function Sys$_ScriptLoaderTask$_addScriptElementHandlers() {
2 this._scriptLoadDelegate = Function.createDelegate(this, this._scriptLoadHandler);
3
4 if (Sys.Browser.agent !== Sys.Browser.InternetExplorer) {
5 this._scriptElement.readyState = 'loaded';
6 $addHandler(this._scriptElement, 'load', this._scriptLoadDelegate);
7 }
8 else {
9 $addHandler(this._scriptElement, 'readystatechange', this._scriptLoadDelegate);
10 }
11 if (this._scriptElement.addEventListener) {
12 this._scriptErrorDelegate = Function.createDelegate(this, this._scriptErrorHandler);
13 this._scriptElement.addEventListener('error', this._scriptErrorDelegate, false);
14 }
15 }