Fix embed loading regression (#227)
* pass in the embed index.html (a page just containing <replay-app-main></replay-app-main>) to wabac.js via indexHtml query arg to be served back at replay root fixes regression in 1.8.9, fixes #226 * update CHANGES.md * bump to wabac.js 2.16.11
This commit is contained in:
+5
-2
@@ -1,7 +1,7 @@
|
||||
import { LitElement, html, css } from "lit";
|
||||
import { ifDefined } from "lit/directives/if-defined.js";
|
||||
|
||||
import { wrapCss, rwpLogo } from "./misc";
|
||||
import { wrapCss, rwpLogo, EMBED_INDEX_HTML } from "./misc";
|
||||
import { SWManager } from "./swmanager";
|
||||
|
||||
var scriptSrc = document.currentScript && document.currentScript.src;
|
||||
@@ -101,7 +101,10 @@ class Embed extends LitElement {
|
||||
return;
|
||||
}
|
||||
|
||||
const name = this.swName;
|
||||
const query = new URLSearchParams();
|
||||
query.set("indexHtml", EMBED_INDEX_HTML);
|
||||
|
||||
const name = this.swName + "?" + query.toString();
|
||||
const appName = this.appName;
|
||||
const scope = this.replaybase;
|
||||
const requireSubdomainIframe = this.requireSubdomainIframe;
|
||||
|
||||
@@ -11,6 +11,14 @@ import rwpLogo from "../assets/logo.svg";
|
||||
const apiPrefix = "./w/api";
|
||||
const replayPrefix = "./w";
|
||||
|
||||
const EMBED_INDEX_HTML = `
|
||||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
<replay-app-main></replay-app-main>
|
||||
</body></html>
|
||||
`;
|
||||
|
||||
// ===========================================================================
|
||||
const allCss = unsafeCSS(allCssRaw);
|
||||
function wrapCss(custom) {
|
||||
@@ -232,4 +240,5 @@ export {
|
||||
unsafeSVG,
|
||||
apiPrefix,
|
||||
replayPrefix,
|
||||
EMBED_INDEX_HTML
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user