Documentation
    Preparing search index...

    Interface PointerSurface

    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".

    interface PointerSurface {
        addEventListener(type: string, listener: SurfacePointerListener): void;
        getBoundingClientRect(): SurfaceRect;
        removeEventListener(type: string, listener: SurfacePointerListener): void;
    }
    Index
    • The surface's current position and size in client pixels.

      Returns SurfaceRect