code: function resolveScriptEvent(resolver, evt) {
          /*jshint validthis:true */
          var script = this;
  
          // run only when ready
          // script.readyState is completed or loaded
          if (script.readyState &&
              !(/^c|loade/.test(script.readyState))
          ) return;
  
          // never rerun callback
          if (script.loadStatus) return;
  
          // unbind to avoid rerun
          script.onload = script.onreadystatechange = script.onerror = null;
  
          script.loadStatus = true;
  
          if (evt && evt.type === "error") {
              var src = script.src || "Resource",
                  fails = " fails to load.";
  
              // custom error
              // TODO: create a more specific stack for this Error
              var error = {
                  name: "ConnectionError",
                  source: src,
                  evt: evt,
                  stack: src + fails,
                  message: fails,
                  toString: function() {
                      return this.source + this.message;
                  }
              };
              throwLater(error);
  
              resolver.reject(error);
              return;
          }
  
          resolver.resolve();
      }
docs: end of shims 
  @private
  @name resolveScriptEvent
  Script event handler
  
  @param {Object} resolver
  @param {Object} evt