Skip to content

Removed 'canvas' property from 'IWebGL2RenderingContext' #1050

Closed
@DanielRosenwasser

Description

@DanielRosenwasser

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions