diff --git a/navigator/src/epub/frame/FrameManager.ts b/navigator/src/epub/frame/FrameManager.ts index 507f98be..57042bfa 100644 --- a/navigator/src/epub/frame/FrameManager.ts +++ b/navigator/src/epub/frame/FrameManager.ts @@ -66,7 +66,7 @@ export class FrameManager { this.frame.onerror = (err) => { try { rej(err); } catch (error) {} } - this.frame.contentWindow!.location.replace(this.source); + this.frame.src = this.source; }); } diff --git a/navigator/src/epub/fxl/FXLFrameManager.ts b/navigator/src/epub/fxl/FXLFrameManager.ts index 51e908ae..16ed3740 100644 --- a/navigator/src/epub/fxl/FXLFrameManager.ts +++ b/navigator/src/epub/fxl/FXLFrameManager.ts @@ -99,7 +99,7 @@ export class FXLFrameManager { try { rej(e.error); this.loadPromise = undefined; } catch (error) {}; }, { once: true }); this.frame.style.removeProperty("display"); - this.frame.contentWindow!.location.replace(this.source); + this.frame.src = this.source; }); return this.loadPromise; } @@ -187,7 +187,7 @@ export class FXLFrameManager { try { this.showPromise = undefined; rej(e.error); } catch (error) {}; }, { once: true }); this.source = "about:blank"; - this.frame.contentWindow!.location.replace("about:blank"); + this.frame.src = this.source; this.frame.style.display = "none"; }); } diff --git a/navigator/src/webpub/WebPubFrameManager.ts b/navigator/src/webpub/WebPubFrameManager.ts index 4a36e1d4..7c53d8e9 100644 --- a/navigator/src/webpub/WebPubFrameManager.ts +++ b/navigator/src/webpub/WebPubFrameManager.ts @@ -64,7 +64,7 @@ export class WebPubFrameManager { this.frame.onerror = (err) => { try { rej(err); } catch (error) {} } - this.frame.contentWindow!.location.replace(this.source); + this.frame.src = this.source; }); }