Re: [whatwg/xhr] For sync XHR consider setting the service-workers mode to "none" to align browsers (Issue #397)

martinthomson left a comment (whatwg/xhr#397)

Just to add some spice, it has come to my attention that sync XHR and service workers have been proposed as a way of "fixing" asynchronous browser APIs.  If there is a browser API that you don't want to have asynchronous (WebCrypto, say) you can wire that up with a synchronous XHR, routing the resulting fetch via a service worker that holds the response until the promise resolves, to turn it into a blocking function call.  It's abominable, but thankfully it only seems to work in Firefox.  I suggest that maybe it shouldn't work at all.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/xhr/issues/397#issuecomment-2920718469
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/xhr/issues/397/2920718469@github.com>

Received on Thursday, 29 May 2025 22:25:42 UTC