Skip to content

Commit cb769f0

Browse files
author
Lanny McNie
committed
Updated docs to specify issues with cross-domain loading.
Signed-off-by: Lanny McNie <lanny@gskinner.com>
1 parent 92c9f90 commit cb769f0

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

docs/easeljs_docs-NEXT.zip

-36 KB
Binary file not shown.

src/easeljs/display/Bitmap.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ this.createjs = this.createjs||{};
5050
* the Bitmap can be cached.</li>
5151
* <li>Bitmaps with an SVG source will taint the canvas with cross-origin data, which prevents interactivity. This
5252
* happens in all browsers except recent Firefox builds.</li>
53+
* <li>Images loaded cross-origin will throw cross-origin security errors when interacted with using a mouse, using
54+
* methods such as `getObjectUnderPoint`, or using filters, or caching. You can get around this by setting
55+
* `crossOrigin` flags on your images before passing them to EaselJS, eg: `img.crossOrigin="Anonymous";`</li>
5356
* </ol>
5457
*
5558
* @class Bitmap

src/easeljs/display/SpriteSheet.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ this.createjs = this.createjs||{};
127127
* var spriteSheet = new createjs.SpriteSheet(data);
128128
* var animation = new createjs.Sprite(spriteSheet, "run");
129129
*
130+
*
131+
* <strong>Warning:</strong> Images loaded cross-origin will throw cross-origin security errors when interacted with
132+
* using a mouse, using methods such as `getObjectUnderPoint`, using filters, or caching. You can get around this by
133+
* setting `crossOrigin` flags on your images before passing them to EaselJS, eg: `img.crossOrigin="Anonymous";`
134+
*
130135
* @class SpriteSheet
131136
* @constructor
132137
* @param {Object} data An object describing the SpriteSheet data.

0 commit comments

Comments
 (0)