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:
parent
c41340f5b5
commit
8b14551ab0
1 changed files with 4 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue