The drawing surface pointer events arrive on, described by what this module
actually touches — the same structural-seam policy @fourjs/render-webgl uses
for its canvas (WebglCanvas), and for the same reasons: an
HTMLCanvasElement, a wrapper around one, and a test double are all equally
acceptable, instanceof HTMLCanvasElement fails across realms, and this
package does not name DOM types.
There is deliberately no runtime validation of the argument: unlike §61's
canvas, which arrives typed unknown and must be narrowed, this is a
checked parameter type, and §89 has no error code for "wrong argument".
The drawing surface pointer events arrive on, described by what this module actually touches — the same structural-seam policy
@fourjs/render-webgluses for its canvas (WebglCanvas), and for the same reasons: anHTMLCanvasElement, a wrapper around one, and a test double are all equally acceptable,instanceof HTMLCanvasElementfails across realms, and this package does not name DOM types.There is deliberately no runtime validation of the argument: unlike §61's
canvas, which arrives typedunknownand must be narrowed, this is a checked parameter type, and §89 has no error code for "wrong argument".