mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-05 15:32:55 +02:00
Bypass iframe dynamic html security for Cordova windows platform
This commit is contained in:
parent
d9c2559b21
commit
24141db3d9
1 changed files with 9 additions and 1 deletions
|
@ -381,7 +381,15 @@ class IframeView {
|
|||
}
|
||||
|
||||
this.iframe.contentDocument.open();
|
||||
this.iframe.contentDocument.write(contents);
|
||||
// For Cordova windows platform
|
||||
if(window.MSApp && MSApp.execUnsafeLocalFunction) {
|
||||
var outerThis = this;
|
||||
MSApp.execUnsafeLocalFunction(function () {
|
||||
outerThis.iframe.contentDocument.write(contents);
|
||||
});
|
||||
} else {
|
||||
this.iframe.contentDocument.write(contents);
|
||||
}
|
||||
this.iframe.contentDocument.close();
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue