search

goog.labs.style.PixelDensityMonitor

Provided By
Extends
All Implemented Interfaces

Monitors the window for changes to the ratio between device and screen pixels, e.g. when the user moves the window from a high density screen to a screen with normal density. Dispatches goog.labs.style.PixelDensityMonitor.EventType.CHANGE events when the density changes between the two predefined values NORMAL and HIGH.

This class uses the window.devicePixelRatio value which is supported in WebKit and FF18. If the value does not exist, it will always return a NORMAL density. It requires support for MediaQueryList to detect changes to the devicePixelRatio.

new PixelDensityMonitor( opt_domHelper )

Parameters
opt_domHelpergoog.dom.DomHelper=

The DomHelper which contains the document associated with the window to listen to. Defaults to the one in which this code is executing.

Instance Methods

Instance Properties

Enumerations