Finding zoom level from window object properties
Posted
by Mihai Fonoage
on Stack Overflow
See other posts from Stack Overflow
or by Mihai Fonoage
Published on 2010-05-11T15:41:38Z
Indexed on
2010/05/11
15:44 UTC
Read the original article
Hit count: 407
Hi,
I want to find out the zoom level of what is being displayed in a browser window based on the javascripts' window object properties (http://www.javascriptkit.com/jsref/window.shtml) to which I have access. I just can't seem to find the right mathematical formula for the zoom based on the inner width, page offset, etc. I found a solution, but that uses the document.body.getBoundingClientRect call which does not return anything in my case and for which I can't tell if there's a suitable replacement from the window properties. I am using Safari.
Thank you, Mihai
© Stack Overflow or respective owner