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

Removed 'canvas' property from 'IWebGL2RenderingContext' #1050

Closed
DanielRosenwasser opened this issue Jul 2, 2021 · 1 comment · Fixed by #1051
Closed

Removed 'canvas' property from 'IWebGL2RenderingContext' #1050

DanielRosenwasser opened this issue Jul 2, 2021 · 1 comment · Fixed by #1051

Comments

@DanielRosenwasser
Copy link
Member

I tried building xterm.js recently, and got the following error:

addons/xterm-addon-webgl/src/GlyphRenderer.ts:305:26 - error TS2339: Property 'canvas' does not exist on type 'IWebGL2RenderingContext'.

305     gl.viewport(0, 0, gl.canvas.width, gl.canvas.height);   

Looks like the canvas property was removed as per #1029, but was that intentional? MSDN says

WebGL 2 is an extension to WebGL 1. The WebGL2RenderingContext interface implements all members of the WebGLRenderingContext interface. Some methods of the WebGL 1 context can accept additional values when used in a WebGL 2 context. You will find this info noted on the WebGL 1 reference pages.

@saschanaz
Copy link
Contributor

No, it was accidental. I'll take a look.

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 a pull request may close this issue.

2 participants