1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-03 14:59:18 +02:00

Optional global settings to disable srcdoc, since it will fail on cordova (#588)

This commit is contained in:
Gerhard Sletten 2017-04-12 23:08:05 +02:00 committed by Fred Chasen
parent 84e695fe08
commit 4dc35bfc72
2 changed files with 3 additions and 2 deletions

View file

@ -32,7 +32,8 @@ class DefaultViewManager {
axis: this.settings.axis,
layout: this.layout,
width: 0,
height: 0
height: 0,
globalOptions: extend({}, options.settings, {disableSrcdoc: options.settings.disableSrcdoc || false})
};
}

View file

@ -102,7 +102,7 @@ class IframeView {
// Firefox has trouble with baseURI and srcdoc
// TODO: Disable for now in firefox
if("srcdoc" in this.iframe) {
if("srcdoc" in this.iframe && !this.settings.globalOptions.disableSrcdoc) {
this.supportsSrcdoc = true;
} else {
this.supportsSrcdoc = false;