[whatwg] Effect on window.opener when navigating an existing window using window.open

Bob Owen bobowencode at gmail.com
Mon Mar 3 03:04:04 PST 2014


Hi,

The spec at [1] and [2] 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?

If agreed, looking at the code, this would seem to be a fairly simple
change for WebKit and Blink as well.

Thanks,
Bob

[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#dom-opener

[2] http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name



More information about the whatwg mailing list