1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-05 15:32:55 +02:00

Add iframe after assigning src

This commit is contained in:
Fred Chasen 2018-11-01 09:55:54 -07:00
parent c41340f5b5
commit 8b14551ab0

View file

@ -102,7 +102,6 @@ class IframeView {
this.element.setAttribute("ref", this.index);
this.element.appendChild(this.iframe);
this.added = true;
this.elementBounds = bounds(this.element);
@ -366,10 +365,14 @@ class IframeView {
if (this.settings.method === "blobUrl") {
this.blobUrl = createBlobUrl(contents, "application/xhtml+xml");
this.iframe.src = this.blobUrl;
this.element.appendChild(this.iframe);
} else if(this.settings.method === "srcdoc"){
this.iframe.srcdoc = contents;
this.element.appendChild(this.iframe);
} else {
this.element.appendChild(this.iframe);
this.document = this.iframe.contentDocument;
if(!this.document) {