- From: Bob Owen <bobowencode@gmail.com>
- Date: Wed, 2 Apr 2014 21:16:58 +0100
- To: Ian Hickson <ian@hixie.ch>
- Cc: whatwg@whatwg.org
On 2 April 2014 18:43, Ian Hickson <ian@hixie.ch> wrote: > > On Mon, 3 Mar 2014, Bob Owen wrote: > > > > The spec [...] seems to be fairly clear that if an existing window is > > navigated using window.open, by a browsing context that is not the > > original opener, then window.opener should remain unchanged. > > > > Currently, Trident (and incidentally Presto) seems to have the correct > > behaviour, but Blink, WebKit and Gecko all change window.opener to the > > window of the browsing context that has just caused it to navigate. I > > believe this to be a very long standing difference (>10 years for Gecko > > and Trident) > > > > I am proposing to change Gecko to match the spec, but I was advised to > > raise the issue here before going ahead. > > > > Do people agree that window.opener should remain unchanged in this > > circumstance? > > Did you receive any off-list feedback on this, or attempt to implement it > and get any implementation experience? Thanks for getting back to me Ian. No, no other feedback. I have a patch for it, but haven't pursued it any further. I could investigate putting the change in for Firefox Nightly, if you think that might help with finding any compat issues. > Having "opener" be the actual opener seems pretty intuitive to me; if > there's no compat need to do otherwise, it seems like a reasonable choice. > > Is there a security reason to prefer the latest navigator? Agreed, the specified behaviour makes sense to me, if only because of the name. The fact that you can also use window.open for subsequent navigation (which leads to the different behaviours), muddies the water a bit, but that's a genie that would definitely refuse to go back in the bottle. Over security reasons, although I don't have any concrete examples, I would have thought that either could possibly cause problems, if the opposite behaviour was expected. So, consistency is probably the most important thing. I can also see that both pieces of information (original opener and last navigator) might be useful. So, maybe the other could be added either way.
Received on Wednesday, 2 April 2014 20:17:40 UTC