Custom SW filename (#175)

* embed: support using custom filename for service worker instead of sw.js
can be set via <replay-web-page swName='custom.js' ... > property
docs: update embedding docs to mention new option
fixes #160
This commit is contained in:
Ilya Kreymer
2023-06-14 17:06:51 -07:00
committed by GitHub
parent d767e6e164
commit d1e84b1b52
8 changed files with 1222 additions and 2663 deletions
+4 -2
View File
@@ -123,7 +123,9 @@ class Coll extends LitElement
appVersion: { type: String },
appLogo: { type: String },
autoUpdateInterval: { type: Number }
autoUpdateInterval: { type: Number },
swName: { type: String }
};
}
@@ -672,7 +674,7 @@ class Coll extends LitElement
if (this.collInfo && !this.collInfo.coll) {
return html`
<wr-loader .loadInfo="${this.loadInfo}" embed="${this.embed}"
<wr-loader .loadInfo="${this.loadInfo}" embed="${this.embed}" swName="${this.swName}"
.coll="${this.coll}" .sourceUrl="${this.sourceUrl}" @coll-loaded=${this.onCollLoaded}></wr-loader>`;
} else if (this.collInfo) {
return html`