Skip to content

Removed 'canvas' property from 'IWebGL2RenderingContext' #1050

Closed

Description

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.

Activity

  1. saschanaz commented on Jul 3, 2021

    @saschanaz
    Contributor

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

  2. added a commit that references this issue on Jul 3, 2021
    f626c1c
  3. added a commit that references this issue on Jul 3, 2021
    18c98d8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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