Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly check for 2D OffscreenCanvas support #132

Merged
merged 1 commit into from
Nov 11, 2020

Conversation

BenV
Copy link
Contributor

@BenV BenV commented Nov 11, 2020

In Firefox you can enable "offscreen canvas" support in about:config which will make OffscreenCanvas available, but getContext('2d') will fail with a not implemented error since only WebGL offscreen canvases are supported. This simply checks for the existence of OffscreenCanvasRenderingContext2D as well when determining whether offscreen canvases can be utilized.

@catdad
Copy link
Owner

catdad commented Nov 11, 2020

Thanks, this makes sense!

@catdad catdad merged commit acbd5b2 into catdad:master Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants