Skip to content

Commit 24141db

Browse files
committed
Bypass iframe dynamic html security for Cordova windows platform
1 parent d9c2559 commit 24141db

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Diff for: src/managers/views/iframe.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,15 @@ class IframeView {
381381
}
382382

383383
this.iframe.contentDocument.open();
384-
this.iframe.contentDocument.write(contents);
384+
// For Cordova windows platform
385+
if(window.MSApp && MSApp.execUnsafeLocalFunction) {
386+
var outerThis = this;
387+
MSApp.execUnsafeLocalFunction(function () {
388+
outerThis.iframe.contentDocument.write(contents);
389+
});
390+
} else {
391+
this.iframe.contentDocument.write(contents);
392+
}
385393
this.iframe.contentDocument.close();
386394

387395
}

0 commit comments

Comments
 (0)