1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-04 15:09:16 +02:00

fixes for react

This commit is contained in:
fchasen 2016-04-04 13:51:35 -04:00
parent 48216cc7ec
commit 8ec9a5fbeb
14 changed files with 2372 additions and 150 deletions

View file

@ -88,7 +88,12 @@ Section.prototype.render = function(_request){
this.load(_request).
then(function(contents){
var serializer = new XMLSerializer();
var serializer;
if (typeof XMLSerializer === "undefined") {
XMLSerializer = require('xmldom').XMLSerializer;
}
serializer = new XMLSerializer();
this.output = serializer.serializeToString(contents);
return this.output;
}.bind(this)).