Closed
Description
PaintRenderingContext2D
(https://drafts.css-houdini.org/css-paint-api/#2d-rendering-context) implements CanvasDrawImage
(https://html.spec.whatwg.org/multipage/canvas.html#canvasdrawimage), which uses CanvasImageSource
as the type of its image
argument (https://html.spec.whatwg.org/multipage/canvas.html#canvasimagesource).
In examples such as https://github.com/w3c/web-platform-tests/blob/740aba06484bcb174c692175493fa591d29feedd/css-paint-api/paint2d-image.html#L20, the image
is a URL. It is not obvious from the spec how this should be converted to a CanvasImageSource
. In particular, paint worklets do not have access to the HTMLImageElement
class, as it is not marked Exposed=(Window,PaintWorklet)
.