window.devicePixelRatio = window.devicePixelRatio ||
Math.round(window.screen.availWidth / document.documentElement.clientWidth)
Got it from http://blogs.windows.com/windows_phone/b/wpdev/archive/2012/11/08/internet-explorer-10-brings-html5-to-windows-phone-8-in-a-big-way.aspx