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
Add view type as a template for IRenderer, Application #8820
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice if the Application
could automatically type itself to Application<OffscreenCanvas>
, Application<HTMLCanvasElement>
or Application<NodeCanvasElement>
depending on the context, but I'm not sure that's possible.
LGTM! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
good |
LGTM! |
Current Issue
Since we are using ICanvas as a generic interface for OffscreenCanvas, HTMLCanvasElement and Node's canvas, we are getting a type error doing something pretty basic:
Workaround
Current workaround is to cast:
Fix
Use a template to specify the type of view.