css-houdini-drafts
css-houdini-drafts copied to clipboard
[css-paint-api] drawImage() throws error when url() is passed. Why are ImageBitmap, OffscreenCanvas not defined at PaintWorkletGlobalScope?
The PaintWorklet specification claims that drawImage() is possible.
However a TypeError is thrown when passing url() (CSSImageValue) function to drawImage() (https://github.com/w3c/css-houdini-drafts/issues/877#issuecomment-487727155)
TypeError: Failed to execute 'drawImage' on 'PaintRenderingContext2D': The provided value is not of type '(CSSImageValue or HTMLImageElement or SVGImageElement or HTMLVideoElement or HTMLCanvasElement or ImageBitmap or OffscreenCanvas)'
- Is
PaintRenderingContext2D.drawImage()broken? - Why are
ImageBitmapandOffscreenCanvasnot defined atPaintWorkletGlobalScope?