ruffle: forward useRuffle to the sw.js registration in embed mode (#537)

ensure ruffle embed options needed for ruffle (injectScripts and allowProxyPaths) are added to the service worker query args in embed.ts
This commit is contained in:
mark beasley
2026-07-29 18:16:03 -07:00
committed by GitHub
parent 8c752e6e27
commit 6bf1cc8f31
+7 -1
View File
@@ -112,7 +112,13 @@ class Embed extends LitElement {
return; return;
} }
const name = this.swName + "?serveIndex=1"; const swParams = new URLSearchParams();
swParams.set("serveIndex", "1");
if (this.useRuffle) {
swParams.set("injectScripts", "ruffle/ruffle.js");
swParams.set("allowProxyPaths", "ruffle/");
}
const name = this.swName + "?" + swParams.toString();
const appName = this.appName; const appName = this.appName;
const scope = this.replaybase; const scope = this.replaybase;
const requireSubdomainIframe = this.requireSubdomainIframe; const requireSubdomainIframe = this.requireSubdomainIframe;