1
0
Fork 0
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:
Wassem Keddah 2019-10-17 15:11:03 +02:00
parent d9c2559b21
commit 24141db3d9

View file

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