Search code examples
javascripthtmlpostmessage

When using window.create how can I get the object of the original window in new window


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?


Solution

  • You can use window.opener in the popup to access the opener window.