Permalink
Browse files

Support images loaded from external domains in Firefox

  • Loading branch information...
1 parent a8f617d commit 8588fd632850214ef0f00fd3f1463d880b266c3f Ivo Wetzel committed Feb 5, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 cocos2d/textures/CCTextureCache.js
View
4 cocos2d/textures/CCTextureCache.js
@@ -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);
@@ -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 () {

0 comments on commit 8588fd6

Please sign in to comment.