Open Lubrsi opened 2 years ago
What's currently step 12 of https://xhr.spec.whatwg.org/#dom-xmlhttprequest-send defines a way to rewrite this. Essentially using the "pause" primitive and a boolean that gets flipped by a response callback algorithm. While a tad longer, it makes it a lot clearer what is going on.
https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-classic-worker-imported-script
The synchronous flag was removed from fetch here: https://github.com/whatwg/fetch/commit/12dd6fa8ca76bd3bdff0c65a0c5a84b3ca870c3d