-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
const worker = workerize(`
export function drawImage(canvas,image){ return canvas.getContext("2d").drawImage(image, 0, 0)}
`)(canvas, image)
worker.drawImage(document.querySelector('canvas'). transferControlToOffscreen(),img)
it will throw
DOMException: Failed to execute 'postMessage' on 'Worker': An OffscreenCanvas could not be cloned because it was not transferred.
https://developer.mozilla.org/en-US/docs/Web/API/Transferable
pimdewit
Metadata
Metadata
Assignees
Labels
No labels