In mobile application I have page with iframe.
<iframe id="activityFrame"></iframe>
To show iframe content we run next code.
var frame = document.getElementById('activityFrame');
var url = "ourdomen.com";
iframe.setAttribute('src', url);
All iframe content loaded correctly. User can navigate between pages. But on last page inside iframe "ourdomen.example" load other iframe with payment form from another domen "secyrityservice.example". When user click submit button "secyrityservice.example" do rederct on "ourdomen.com" iframe by
<script type="text/javascript">
<!--
$(function() {
document.redirectform.submit();
});
//-->
</script>
</head>
<body>
<form name="redirectform" action="ourdomen.example"
method="post" target="_parent">
</form>
And we get error in console Unsafe JavaScript attempt to initiate navigation for frame with URL 'ourdomen.com' from frame with URL 'serycirtyservice.example'. The frame attempting navigation is neither same-origin with the target, nor is it the target's parent or opener.
If run chrome with --disable-web-security, all work correct without errors. I try disable web-secrurity in cordova config by
<access origin="*" />
<preference name="websecurity" value="disable" />
but it didn't help for android and ios build. I read questions Unsafe JavaScript attempt to access frame with URL and Unsafe JavaScript attempt to access frame with URL it didn't help.
How I can disable this error in cordova or fix it? I use cordova 3.4.0
Thanks.