Creating window remotes using a user defined property
Lets walk through this process one step at a time. To begin with, we will first implement our custom property in the main window:
The core of the above is:
"creator" is a custom property added to "win2" that acts as the opener property. We could have called "creator" some other name, if we wanted to. "self", however, is a pre-built property, and has to be called as such. This property references the current window, and by assigning the current window (the main window, in this case) to the creator property, we have our own window.opener property!
All we have to do now is use this custom property in the document inside the remote control window to access the main window:
Ok, so we've went over the two techniques for creating window remotes.