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.

OffscreenCanvas support broken

See original GitHub issue

Describe the bug

OffscreenCanvas no longer works

To Reproduce

Use any example with OffscreenCanvas

** Reason **

This commit

https://github.com/mrdoob/three.js/commit/6056cbfc22b3675b65d5109a5a096ec39c91cdc6

tries to call _canvas.setAttribute but OffscreenCanvas does not have a function setAttribute

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
mrdoobcommented, Nov 10, 2021

How about this?

// OffscreenCanvas does not have setAttribute
if ( 'setAttribute' in _canvas ) _canvas.setAttribute( 'data-engine', `three.js r${REVISION}` );
2reactions
mrdoobcommented, Nov 11, 2021

Looking good! Let’s use this approach. And hope that future types of elements having a setAttribute() won’t have different semantics 😅 .

At this point I wouldn’t be surprised… 😬

Done! https://github.com/mrdoob/three.js/commit/fe71b47232accbe26a5acc2e2c5bffe74219e551

Read more comments on GitHub >

github_iconTop Results From Across the Web

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 >
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 >
OffscreenCanvas in 97 nightly : r/firefox - Reddit
Today the initial implementation of OffscreenCanvas, supporting WebGL (and ... Subpixel anti-aliasing is broken in menus since Firefox 90, ...
Read more >
OffScreenCanvas and touch events - javascript - Stack Overflow
... to handle the events, this means the promise that OffscreenCanvas can run smoothly even when the main thread is locked is broken...
Read more >
OffscreenCanvas in WebKit 2021 update - YouTube
An update on the current status of OffscreenCanvas in WebKit and a brief, technical discussion of the work accomplished this year, ...
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