Skip to content

Commit 70d944c

Browse files
xidachenbfgeek
authored andcommitted
[css-paint-api] Add devicePixelRatio property to PaintRenderingContext2D (w3c#446)
Adds the devicePixelRatio property to PaintWorkletGlobalScope, which is the same as the Window version.
1 parent bec0cd6 commit 70d944c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

css-paint-api/Overview.bs

+4
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,14 @@ partial interface CSS {
131131

132132
The {{PaintWorkletGlobalScope}} is the global execution context of the {{paintWorklet}}.
133133

134+
The {{PaintWorkletGlobalScope}} has a {{PaintWorkletGlobalScope/devicePixelRatio}}
135+
property which is identical to the Window.{{Window/devicePixelRatio}} property.
136+
134137
<pre class='idl'>
135138
[Global=(Worklet,PaintWorklet),Exposed=PaintWorklet]
136139
interface PaintWorkletGlobalScope : WorkletGlobalScope {
137140
void registerPaint(DOMString name, VoidFunction paintCtor);
141+
readonly attribute unrestricted double devicePixelRatio;
138142
};
139143
</pre>
140144

0 commit comments

Comments
 (0)