[whatwg] Processing the zoom level - MS extensions to window.screen
chuck at jumis.com
Fri Nov 19 12:04:53 PST 2010
It's not possible to discover the scaling of CSS pixels to actual device
pixels, with the current standard.
There are three non-standard ways to access them, from what I can see.
window.innerWidth and window.outerWidth are decoupled, one is in CSS pixels,
the other is in screen pixels. So that's a minor work-around.
This is apart from the existing convention on mobile phones of
targetDpiDensity and dpiPixelRatio.
Microsoft's solution, seems to be superior, by exposing everything:
systemXDPI, deviceXDPI, logicalXDPI (and YDPI ).
They also have fontSmoothingEnabled and updateInterval;
which are handy, but out of scope for this section.
Moz has animation hooks:
I'm pushing Microsoft's solution, of exposing the data through
Can we all get on board with that one? Are there other proposals?
More information about the whatwg