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,
|
||||
deferred = new RSVP.defer();
|
||||
|
||||
render.document = render.iframe.contentDocument;
|
||||
|
||||
// this.iframe.contentWindow.location.replace(url);
|
||||
chapter.render().then(function(contents){
|
||||
|
||||
chapter.url().then(function(url){
|
||||
// Reset the scroll position
|
||||
render.leftPos = 0;
|
||||
|
||||
|
@ -44,6 +40,7 @@ EPUBJS.Render.Iframe.prototype.load = function(chapter){
|
|||
}
|
||||
|
||||
this.iframe.onload = function(e) {
|
||||
render.document = render.iframe.contentDocument;
|
||||
render.docEl = render.document.documentElement;
|
||||
render.headEl = render.document.head;
|
||||
render.bodyEl = render.document.body;
|
||||
|
@ -68,10 +65,7 @@ EPUBJS.Render.Iframe.prototype.load = function(chapter){
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
this.document.open();
|
||||
this.document.write(contents);
|
||||
this.document.close();
|
||||
this.iframe.contentWindow.location.replace(url);
|
||||
|
||||
}.bind(this));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue