CanvasBlocker
CanvasBlocker copied to clipboard
screen spoofs in iframe !== top level document
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.
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