question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support OffscreenCanvas

See original GitHub issue

Spector 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
cdatacommented, Dec 21, 2019

@sebavan I made an attempt in #129 - LMKWYT!

1reaction
sebavancommented, Dec 20, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found