• subscribe to changes in the natural resolution of an on-screen element (usually a <canvas>).

    put another way, cb is called whenever getNaturalResolution would return a different value. under the hood, this combines monitorDevicePixelRatio with a ResizeObserver.

    Parameters

    • target: Element
    • cb: (() => void)
        • (): void
        • Returns void

    Returns (() => void)

    stop / deregister callback

      • (): void
      • Returns void

Generated using TypeDoc