1
0
Fork 0
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:
Fred Chasen 2014-09-16 08:47:07 -04:00
parent 854bebf6e8
commit e3a3f942eb

View file

@ -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));