▲ | immibis 3 days ago | |||||||||||||||||||||||||||||||
Why do you need libcurl to work in WebAssembly... when you're already running in a browser? (The answer: to run third-party code that uses libcurl because it isn't designed to run in web browsers) | ||||||||||||||||||||||||||||||||
▲ | RandomRandy 3 days ago | parent | next [-] | |||||||||||||||||||||||||||||||
One advantage over using fetch is that the WebAssembly approach seems to bypass CORS > If you inspect the devtools network tab of your browser, you see that everything happens over a single WebSocket to wss://ws.r-universe.dev. The browser is not making the HTTP requests, in fact this would not even be possible because we download the files from a host that does not enable CORS. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
▲ | nticompass 3 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||
The "real" answer: because you can. |