Support OffscreenCanvas
See original GitHub issueSpector does not detect canvas controlled by a WebWorker. When explicitly capturing canvas, it produces error.
const offscreenCanvas = (renderCanvas as any).transferControlToOffscreen();
const spector = new SPECTOR.Spector();
spector.displayUI();
spector.captureCanvas(offscreenCanvas);
This produces error:
TypeError: e.getAttribute is not a function
Or:
No webgl context available on the chosen canvas.
If the DOM canvas is passed to captureCanvas().
I tried using it inside WebWorker to capture data in JSON, send it to DOM thread and display it there. But it throws error when imported:
ReferenceError: window is not defined
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:14 (11 by maintainers)
Top Results From Across the Web
OffscreenCanvas - Web APIs | MDN
Chrome Edge
OffscreenCanvas Full support. Chrome69. Toggle history Full support. Edge79...
OffscreenCanvas() constructor Full support. Chrome69. Toggle history Full support. Edge79...
contextlost event Full support. Chrome99....
Read more >OffscreenCanvas | Can I use... Support tables for ... - CanIUse
"Can I use" provides up-to-date browser support tables for support of ... OffscreenCanvas allows canvas drawing to occur with no connection to the...
Read more >Speed up Your Canvas Operations with a Web Worker
The OffscreenCanvas allows to create a canvas that can be rendered off screen. It can also be used in web workers. Avoid jank...
Read more >183720 – Complete OffscreenCanvas implementation
Since webkit does not support Webp, OffscreenCanvas is the only performant way to convert such images on a background thread. Not having ...
Read more >What's the state of OffscreenCanvas's support for 2d context?
It looks like OffscreenCanvas will ship in Chrome 69 or Chrome 70 with support for both 2D and WebGL. As for Images, you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sebavan I made an attempt in #129 - LMKWYT!
Yup makes much more sense to me 😃
If you need it pretty soon, feel free to make a PR, I am currently focusing my spare time (pretty tight) to not drop Firefox support due to review issues.