Nested WACZ + embed reloading fix (#374)

- Loading: Fix for loading nested WACZ files (via wabac.js 2.20.7)
- Embeds: Support full reload on embeds via fullReload() call on embed
web component
This commit is contained in:
Ilya Kreymer
2024-11-22 17:58:44 -08:00
committed by GitHub
parent bf6da1ed00
commit 9fa008bab2
5 changed files with 27 additions and 6 deletions
+7
View File
@@ -126,6 +126,13 @@ class Embed extends LitElement {
}
}
fullReload() {
const iframe = this.renderRoot.querySelector("iframe");
if (iframe?.contentWindow) {
iframe.contentWindow.postMessage({ type: "fullReload" });
}
}
handleMessage(event: IframeMessage) {
const iframe = this.renderRoot.querySelector("iframe");