Problem with Firefox window.opener

"window.opener" works fine in both IE and Firefox, while "Open in New Tab" is used from the context menu; A console error says that "window.opener" is null. Is there any other way to open the knife?

Edit: A console error says that "window.opener" is null only if the "Open in new tab" button is clicked. For all other cases, there is no such error. Therefore, I would like to know if there is an alternative other than "window.opener".

+3
source share
2 answers

window.openeronly works if the window (or tab, if it was redirected to the tab) was opened with window.openor using an attribute targetor the like. In particular, the user interface never installs a window opener.

+2
source

it window.open () IIRC

-5
source

Source: https://habr.com/ru/post/1709657/


All Articles