Draft This page is not complete.
The PaintWorklet.devicePixelRatio
read-only property of the PaintWorklet
interface returns the current device's ratio of physical pixels to logical pixels.
Syntax
var devicePixelRatio = paintWorklet.devicePixelRatio;
Value
A double-precision integer.
Specifications
Specification | Status | Comment |
CSS Painting API Level 1The definition of 'PaintWorklet.devicePixelRatio' in that specification. | Working Draft | Initial definition. |
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
No compatibility data found. Please contribute data for "api.PaintWorklet.PaintWorklet.devicePixelRatio" (depth: 1) to the MDN compatibility data repository.
See Also
- PaintWorklet
- CSS.paintWorklet
- Worklet
- CSS Painting API
- Houdini APIs
- Houdini overview
- window.devicePixelRatio
PaintWorklet.devicePixelRatio by Mozilla Contributors is licensed under CC-BY-SA 2.5.