Re: [csswg-drafts] [cssom-view] Should browser zoom affect screen.width?

I study task to get the zoom level.

Where is no universal, simple way.

I found one simple way to get zoom factor, just `screen.width / 
window.innerWidth`
This works in Chrome and Safari couse screen.width not affects while 
zooming at this browsers.

In IE, developers use `screen.deviceXDPI / screen.logicalXDPI`

For FireFox developers use CSS.
Add new style sheet, add media rule, check element, remove all back, 
details can be found here
[Detect 
Zoom](https://github.com/tombigel/detect-zoom/blob/master/detect-zoom.js)

It would be better to make more ease way to get zoom factor.
For example, window.zoomFactor variable.

-- 
GitHub Notification of comment by Demitrius
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/399#issuecomment-244810763 
using your GitHub account

Received on Monday, 5 September 2016 20:59:05 UTC