Drawing-buffer height in device pixels. Written by resize.
Drawing-buffer width in device pixels. Written by resize.
Acquires a rendering context. Typed to return unknown because this
package does not name WebGL2RenderingContext; the result is validated
structurally before use.
Optionalattributes: WebglContextAttributes
The drawing surface, described by what this backend actually touches (§61's
RendererOptions.canvasisunknownprecisely so each backend can narrow it here).HTMLCanvasElementandOffscreenCanvas-plus-an-event-target both satisfy this structurally. The narrowing is done at runtime by WebglRenderer.initialize, which is why the interface exists as a target for a checked cast rather than as a parameter type.