Skip to content

Commit aa34d65

Browse files
committed
[css-paint-api] Change "example" class IDL to javascript example.
Fixes w3c#288.
1 parent 4026ad2 commit aa34d65

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

css-paint-api/Overview.bs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,14 @@ interface PaintWorkletGlobalScope : WorkletGlobalScope {
112112
</pre>
113113

114114
<div class='note'>
115-
Note: This is how the class should look.
116-
<pre class='idl'>
117-
callback interface PaintClass {
118-
readonly attribute sequence&lt;DOMString&gt; inputProperties;
119-
void paint(PaintRenderingContext2D ctx, PaintSize geom, StylePropertyMap inputProperties);
120-
};
115+
Note: The shape of the class should be:
116+
<pre class='lang-javascript'>
117+
class MyPaint {
118+
static get inputProperties() { return ['--foo']; }
119+
paint(ctx, size, styleMap) {
120+
// Paint code goes here.
121+
}
122+
}
121123
</pre>
122124
</div>
123125

0 commit comments

Comments
 (0)