I want to prevent an iframe replacing top window's location(url),and I use
<iframe src="./iframe.html" security="restricted" sandbox="allow-forms allow-modals allow-same-origin allow-scripts"></iframe>
and the code of iframe.html
<script>
setTimeout(function(){
top.window.location.replace('https://www.apple.com');
},1000)
</script>
It works correct on Windows 10 Chrome.FireFox and Android,successfully prevented top.window.location ,but safari mobile didn't,I must remove thi allow-scripts value ,and it disaled all scripts of iframes.
Does safari support allow-top-navigation?