PaintWorkletGlobalScope.devicePixelRatio

Draft

This page is not complete.

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

Syntax

var devicePixelRatio = PaintWorkletGlobalScope.devicePixelRatio;

Value

A double-precision integer.

Specifications

Specification Status Comment
CSS Painting API Level 1
The definition of 'PaintWorkletGlobalScope.devicePixelRatio' in that specification.
Working Draft Initial definition.

Browser compatibility

BCD tables only load in the browser

See also