mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
removed cors loading
This commit is contained in:
parent
854bebf6e8
commit
e3a3f942eb
1 changed files with 3 additions and 9 deletions
|
@ -31,11 +31,7 @@ EPUBJS.Render.Iframe.prototype.load = function(chapter){
|
||||||
var render = this,
|
var render = this,
|
||||||
deferred = new RSVP.defer();
|
deferred = new RSVP.defer();
|
||||||
|
|
||||||
render.document = render.iframe.contentDocument;
|
chapter.url().then(function(url){
|
||||||
|
|
||||||
// this.iframe.contentWindow.location.replace(url);
|
|
||||||
chapter.render().then(function(contents){
|
|
||||||
|
|
||||||
// Reset the scroll position
|
// Reset the scroll position
|
||||||
render.leftPos = 0;
|
render.leftPos = 0;
|
||||||
|
|
||||||
|
@ -44,6 +40,7 @@ EPUBJS.Render.Iframe.prototype.load = function(chapter){
|
||||||
}
|
}
|
||||||
|
|
||||||
this.iframe.onload = function(e) {
|
this.iframe.onload = function(e) {
|
||||||
|
render.document = render.iframe.contentDocument;
|
||||||
render.docEl = render.document.documentElement;
|
render.docEl = render.document.documentElement;
|
||||||
render.headEl = render.document.head;
|
render.headEl = render.document.head;
|
||||||
render.bodyEl = render.document.body;
|
render.bodyEl = render.document.body;
|
||||||
|
@ -68,10 +65,7 @@ EPUBJS.Render.Iframe.prototype.load = function(chapter){
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.iframe.contentWindow.location.replace(url);
|
||||||
this.document.open();
|
|
||||||
this.document.write(contents);
|
|
||||||
this.document.close();
|
|
||||||
|
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue