user1151788
user1151788

Reputation: 11

How to set window.opener in Firefox

I have old code, which uses window.opener. I changed opening method of these pages from popup to iframe in a jquery dialog. That works fine with IE and Chrome, where I only need to reset window.opener in onload event. But Firefox does not play ball. It sets opener to null regardless what the opener was or is to be set (which is ludicrous). Is there a way to change window.opener in Firefox? I known I could work around it by storing the opener information elsewhere, but it takes a lot of more changes.

Upvotes: 0

Views: 2315

Answers (1)

Matt Esch
Matt Esch

Reputation: 22956

It's not ludicrous to prevent you overriding read-only properties of host objects. In short, no there is no way to change it. What you need to do is string replace all references to window.opener with a different value and place the object you're interested in there.

Upvotes: 1

Related Questions