Skip to content

Commit

Permalink
Support images loaded from external domains in Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivo Wetzel committed Feb 5, 2013
1 parent a8f617d commit 8588fd6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cocos2d/textures/CCTextureCache.js
Expand Up @@ -102,6 +102,8 @@ cc.TextureCache = cc.Class.extend(/** @lends cc.TextureCache# */{
}
else {
texture = new Image();
texture.crossOrigin = "Anonymous";

var that = this;
texture.addEventListener("load", function () {
that._addImageAsyncCallBack(target, selector);
Expand Down Expand Up @@ -162,6 +164,8 @@ cc.TextureCache = cc.Class.extend(/** @lends cc.TextureCache# */{
}
else {
texture = new Image();
texture.crossOrigin = "Anonymous";

var that = this;
texture.addEventListener("load", function () {

Expand Down

0 comments on commit 8588fd6

Please sign in to comment.