Permalink
Browse files

Changed callbacks to use createjs.proxy

  • Loading branch information...
wdamien committed Nov 20, 2015
1 parent e314908 commit 6d63b13e27de9ac8d8d15764081f5c33d596eaf7
Showing with 5 additions and 6 deletions.
  1. +5 −6 src/preloadjs/loaders/ImageLoader.js
@@ -155,14 +155,13 @@ this.createjs = this.createjs || {};
if (tag.complete) {
successCallback(tag);
} else {
var _this = this;
tag.onload = function() {
successCallback(_this._tag);
}
tag.onload = createjs.proxy(function() {
successCallback(this._tag);
}, this);
tag.onerror = function() {
tag.onerror = createjs.proxy(function() {
errorCallback(_this._tag);
}
}, this);
}
};

0 comments on commit 6d63b13

Please sign in to comment.