css-houdini-drafts icon indicating copy to clipboard operation
css-houdini-drafts copied to clipboard

[css-paint-api] drawImage() throws error when url() is passed. Why are ImageBitmap, OffscreenCanvas not defined at PaintWorkletGlobalScope?

Open guest271314 opened this issue 6 years ago • 0 comments

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)'

  1. Is PaintRenderingContext2D.drawImage() broken?
  2. Why are ImageBitmap and OffscreenCanvas not defined at PaintWorkletGlobalScope?

guest271314 avatar Oct 27 '19 15:10 guest271314