本文介绍了window.opener未在iOS Chrome中设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个文件中,我有

 < a href =t2.htmltarget =_ blank>去< / A> 

t2.html p>

 < script> 
document.write(window.opener);
< / script>

在iOS上的Safari以及Mac上的Chrome和几乎所有其他浏览器上的Chrome上,在您的iOS版Chrome上,我得到了 [object Window] ,就像您期望的那样。

c> null 。



如何到达打开此窗口的窗口?

解决方案

这似乎是一个更大的故事。请参阅此处的Bugtracker:



但似乎iframe可以处理父母的财产,所以也许你可以切换你的应用程序使用弹出窗口来使用覆盖。


In one file, I have

<a href="t2.html" target="_blank">go</a>

In t2.html I have

<script>
document.write(window.opener);
</script>

On Safari on iOS, and on Chrome on the Mac and on pretty much every other browser, it prints out [object Window] like you'd expect.

On Chrome on iOS, I get null.

How do I get to the window that opened this window?

解决方案

This seems to be a bigger story. See Bugtracker here:

http://code.google.com/p/chromium/issues/detail?id=136610&q=window.opener&colspec=ID%20Pri%20Mstone%20ReleaseBlock%20OS%20Area%20Feature%20Status%20Owner%20Summary

But it seems, as if iframes could handle the parent-property, so maybe you could switch your app from using popups to using an overlay.

这篇关于window.opener未在iOS Chrome中设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-26 02:03