使用window.create时如何在新窗口中获取原始窗口的对象
我正在使用新的跨窗口消息传递 API。我使用 window.open 创建一个新窗口,然后我可以向这个新窗口发送消息。我想做相反的事情,并能够从新窗口向原始窗口发送消息。
如何获取原始窗口的对象?
I'm playing with the new cross-window messaging api. I create a new window with window.open and I can send messages to this new window. I would like to do the reverse and be able to send message to original window from the new window.
How can I obtain the object of the original window?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在弹出窗口中使用
window.opener
来访问 opener 窗口。You can use
window.opener
in the popup to access the opener window.