Readonly
colorReadonly
colorReadonly
contentsThe number of device pixels per desktop pixel for this screen (for hidpi configurations where there may be multiple device pixels per desktop px and/or per CSS px).
This seems poorly named (something like devicePixelsPerDesktopPixel would be more accurate/explicit), but given that it is exposed to front-end code and may also be used by add-ons, it's probably not worth the disruption of changing it.
Returns 1.0 if HiDPI mode is disabled or unsupported, or if the host OS uses device pixels as its desktop pixel units (e.g. Windows 7 or GTK/X11). Per-monitor DPI is available in Windows 8.1+, GTK/Wayland or macOS.
Readonly
defaultCSSScaleThe default number of device pixels per unscaled CSS pixel for this screen. This is probably what contentsScaleFactor originally meant to be, prior to confusion between CSS pixels and desktop pixel units.
Readonly
dpiThe DPI of the screen.
Readonly
isReadonly
pixelReadonly
refreshThe target screen refresh rate, in Hz, or 0 if unknown
Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
Generated using TypeDoc
ScreenColorGamut is native type, which cannot be declared [infallible].