Skip to content

Conversation

simonbrunel
Copy link
Member

instanceof HTMLCanvasElement/CanvasRenderingContext2D fails when the item is inside an iframe or when running in a protected environment. We could guess the types from their toString() value but let's keep things flexible and assume it's a sufficient condition if the item has a context2D which has item as canvas.

Fixes #3887 #4102 #4152

@simonbrunel simonbrunel added this to the Version 2.6 milestone Apr 22, 2017
@simonbrunel simonbrunel requested a review from etimberg April 22, 2017 07:52
`instanceof HTMLCanvasElement/CanvasRenderingContext2D` fails when the item is inside an iframe or when running in a protected environment. We could guess the types from their toString() value but let's keep things flexible and assume it's a sufficient condition if the item has a context2D which has item as `canvas`.
@mgetzbw
Copy link

mgetzbw commented May 1, 2017

@simonbrunel looks like Salesforce is fixing their side of the issue however this fix won't be released for a few months. That said I think this fix is still the more appropriate option, as realistically we don't care if the object is a CanvasRenderingContext2D insofar as it can pretend to be one.

@simonbrunel simonbrunel deleted the fix/4102 branch May 1, 2017 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants