The following issue occurs in Android 4.4 devices and above.
This is what our iframe looks like:
<iframe frameborder=0 id="myIFRAME"></iframe>
The following is the way we are getting iframe programmatically:
if(document.getElementById("myIFRAME")){
me.setMyIFRAME(document.getElementById("myIFRAME").contentWindow);
}
This is causing a security error related to Protocol mismatch:
"Uncaught SecurityError: Blocked a frame with origin "https://www.google.com" from accessing a frame with origin "file://". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "file". Protocols must match.
We are using Sencha touch with Cordova to develop our project.
The Cordova security guide says:
If content is served in an iframe from a whitelisted domain, that domain will have access to the native Cordova bridge.
Have you tried adding the external domain to the whitelist inside config.xml
?
<access origin="https://google.com" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With