tomkov
tomkov

Reputation: 1

"closed" property of the window.opener

I have a problem with window.opener in chrome.

If I have a cascade of opened windows (window1 calls window.open, this created window2 calls window.open to create window3). In my understanding, in window3, window.opener points to window2. If I want to access window2 from window3, it is recommended to check first if window2 is still open - thus checking window.opener.closed property.

The problem is that if window2 is closed, window.opener in window3 is null. Thus window.opener.closed would cause an error. Is there any way to access window1 from window3 (if window2 were not closed, it would be in window3 window.opener.opener, but as said, closing window2 makes window.opener to null in window3...).

Any advice? Thx.

Upvotes: 0

Views: 378

Answers (0)

Related Questions