I fail to get subworkers to work in Safari: bugs.webkit.org/show_bug.cgi?i.

This are Firefox 🦊 and Chrome 🛞:
main thread → spawns worker.js → spawns subworker.js

This is Safari 🧭:
main thread → spawns worker.js ↛ fails to spawn subworker.js

There're even two polyfills (github.com/dmihal/Subworkers, github.com/johanholmerin/neste), but neither of them seems to fix it. I feel like I'm missing something… This holds back SQLite Wasm backed by the OPFS to work on Safari.

👋 @jensimmons, @jondavis, @othermaciej

@jensimmons @jondavis @othermaciej After some more digging in the archives, I found bugs.webkit.org/show_bug.cgi?i from 2008, which points at github.com/WebKit/WebKit/pull/ from 2022 by Chris Dumez. So apparently it is implemented, but not shipped?

@othermaciej @jensimmons @jondavis Thank you very much! Hope the minimal repro in the bug helps you debug this. I tried stepping through the code, but it just wouldn’t do anything visibly failing in Web Inspector. If it helps, on the server I can see a request for `subworker.js`, but the Network panel doesn’t see it, nor does Safari seem to do anything with the code—visibly. Curious to see how this happens.

@tomayac @othermaciej @jensimmons @jondavis

subworkers are impemented. WPT shows it, etc.

The current test revealed that subworkers are currently not talking back to the Web Inspector, not that they are not working.

So it is working just not visible. I modified the initial webkit bug. bugs.webkit.org/show_bug.cgi?i

Thanks for the heads up.

Just tested on Safari 16.3, and it's not working. Safari Technology Preview 165 does spawn nested worker but console log are missing.

Unsure of market share, but some detection + backup might be needed here, depending on your support matrix.

@karlcow @tomayac @othermaciej @jensimmons @jondavis

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.