[whatwg] Processing the zoom level - MS extensions to window.screen

Boris Zbarsky bzbarsky at MIT.EDU
Fri Nov 19 13:42:47 PST 2010

On 11/19/10 3:04 PM, Charles Pritchard wrote:
> Mozilla:
> window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIDOMWindowUtils).screenPixelsPerCSSPixel

Note that if you try to do this in a web page, it will throw.  That 
entire interface is mostly for test-automation methods.

We (Mozilla) have no plans to expose screen pixels to untrusted content 
at the moment, more or less as a policy decision.

Why do you need this information, exactly?

> Moz has animation hooks:
> window.mozAnimationStartTime
> window.addEventListener("MozBeforePaint")
> window.mozRequestAnimationFrame()

That's wholly unrelated to screen pixels, yes?


More information about the whatwg mailing list