PaintWorkletGlobalScope.devicePixelRatio

The PaintWorkletGlobalScope.devicePixelRatio read-only property of the PaintWorklet interface returns the current device's ratio of physical pixels to logical pixels.

Value

A double-precision integer.

Specifications

Specification
CSS Painting API Level 1
# ref-for-dom-paintworkletglobalscope-devicepixelratio

Browser compatibility

BCD tables only load in the browser

See also