Hello fellow developers,
I am facing an issue with accessing a pop-up window by its window name after navigating out of the page.
Here are the steps to reproduce the issue:
- Access a html page on your browser.
- From there, open a new named popup window:
window.open("/", "testPopup", "width=320,height=240,resizable=yes,scrollbars=yes")
- Move out from the page to the completely different domain. For example, go to google.com.
- Hit the back button to the previous page and attempt to access the popup with the following JavaScript code:
window.open("", "testPopup")
The browser will open a new blank page instead of returning the Window object of the existing popup.
I have noticed that this technique is still usable up to Chrome 83, but we cannot use it on Chrome 84 onward. (see Access a window by window name)
My question to the community is whether there is any way to access the already opened pop-up window after navigating out from the page. If there is no solution, I would appreciate any suggestions for an alternative workaround.
Thank you in advance for your help.