mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-17 16:10:02 -04:00
sync xhr as a flag
This commit is contained in:
parent
8ad6f644e8
commit
8cbb949e21
3 changed files with 8 additions and 0 deletions
|
@ -26,6 +26,12 @@ export default function (client: ScramjetClient, self: Self) {
|
|||
const args = ctx.this[ARGS];
|
||||
if (!args || args[2]) return;
|
||||
|
||||
if (!self.$scramjet.config.flags.syncxhr) {
|
||||
console.warn("sync xhr disabled in flags");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// it's a sync request
|
||||
// sync xhr to service worker is not supported
|
||||
// there's a nice way of polyfilling this though, we can spin on an atomic using sharedarraybuffer. this will maintain the sync behavior
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue