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:
parent
84e695fe08
commit
4dc35bfc72
2 changed files with 3 additions and 2 deletions
|
@ -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})
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue