mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
corrected load order for view
This commit is contained in:
parent
a8bdd2d042
commit
87bd3a68ad
5 changed files with 18 additions and 16 deletions
|
@ -12,17 +12,12 @@ EPUBJS.View.prototype.load = function(contents) {
|
|||
var loaded = loading.promise;
|
||||
|
||||
this.document = this.iframe.contentDocument;
|
||||
|
||||
// this.iframe.srcdoc = contents;
|
||||
this.document.open();
|
||||
this.document.write(contents);
|
||||
this.document.close();
|
||||
|
||||
|
||||
this.iframe.onload = function(e) {
|
||||
this.window = this.iframe.contentWindow;
|
||||
this.window.addEventListener("resize", this.resized.bind(this), false);
|
||||
this.document = this.iframe.contentDocument;
|
||||
|
||||
|
||||
this.iframe.style.display = "block";
|
||||
|
||||
// Reset Body Styles
|
||||
|
@ -39,6 +34,11 @@ EPUBJS.View.prototype.load = function(contents) {
|
|||
loading.resolve(this);
|
||||
this.loading.resolve(this);
|
||||
}.bind(this);
|
||||
|
||||
// this.iframe.srcdoc = contents;
|
||||
this.document.open();
|
||||
this.document.write(contents);
|
||||
this.document.close();
|
||||
|
||||
return loaded;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue