I want all new APIs to be supported in Web Workers (within reason)

Submitted by Ashley Gullen

For performance reasons, it's good to have as much code running in Web Workers instead of the main thread. There are APIs like OffscreenCanvas that make it possible to do things like advanced WebGL rendering off the main thread. However many APIs are still missing in Workers, such as input events, Web Audio, video, media streams, WebRTC and so on. Each missing API is another hurdle to moving logic to a Web Worker.

More worryingly, new APIs are still being added that are not available in Web Workers. This means there are more hurdles still being added all the time, so the problem is largely getting worse, not better. Some examples of this are: async clipboard; Web Share; Web Bluetooth; Media Session; Native File System; getDisplayMedia; visual viewport; and so on. These are all added on top of the existing notable omissions (e.g. media streams, Web Audio etc).

To try to make sure the problem improves instead of gets worse, I'd like to see a commitment to support all new APIs in Web Workers wherever possible.

Tagged
JavaScript