4 ms·
Via.js: Use the DOM in a Web Worker with WeakRefs
- skrebbel 6y agoThis looks super neat, but I have one beef with it: Calling into other contexts is unavoidably async, yet this code lets you pretend it's not. Via.js handles this with a proxy object that, "records all operations and builds a queue of commands". That's all super neat and smart, but I worry that it totally breaks down when dealing with eg errors. As a programmer, you think you're writing sync code but actually under the hood it's async. I'm not sure that that's the right approach, no matter how neat the code samples look.