CanvasBlocker icon indicating copy to clipboard operation
CanvasBlocker copied to clipboard

screen spoofs in iframe !== top level document

Open Thorin-Oakenpants opened this issue 7 months ago • 0 comments

screen and available screen spoofs should return the same regardless of the source document - e.g. top level document or iframe. In the example below, ignore the css values which you can't spoof.

Image

The top level document is based on the inner window, so we get the stepped size 1920 x 1080 (matchMedia and screen properties)

The iframe (which in this case is 0 width + 0 height, but could be anything) seems to based on the iframe size, so returns the smallest stepped size of 1366 x 768 - which in turn creates a paradox or mismatch

Thorin-Oakenpants avatar Mar 10 '25 14:03 Thorin-Oakenpants