Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disowning openers in targeted navigations #3188

Closed
lucasgadani opened this issue Nov 2, 2017 · 1 comment
Closed

Disowning openers in targeted navigations #3188

lucasgadani opened this issue Nov 2, 2017 · 1 comment

Comments

@lucasgadani
Copy link

lucasgadani commented Nov 2, 2017

I'm looking at fixing chromium bug https://bugs.chromium.org/p/chromium/issues/detail?id=651661 , but looking at the spec it's not entirely clear to me what should be done per spec, as well as different browser have different behaviors.

In particular, the spec says that (https://html.spec.whatwg.org/#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name):

If name is not an ASCII case-insensitive match for "_blank" and there exists a browsing context whose name is the same as name, and current is familiar with that browsing context, and the user agent determines that the two browsing contexts are related enough that it is ok if they reach each other, then set chosen to that browsing context. If there are multiple matching browsing contexts, the user agent should set chosen to one in some arbitrary consistent manner, such as the most recently opened, most recently focused, or more closely related.

In this case, 'new' is still false when choosing a browsing context, so it looks to me that Chrome is following the spec (https://html.spec.whatwg.org/#following-hyperlinks):

Let target and replace be the result of applying the rules for choosing a browsing context given targetAttributeValue, source, and noopener.
If target is null, then return.
If noopener and replace are true, then disown target's opener.

In this case, that target's opener is not disowned.

A few points that should be clarified:

  • What to do for targeted subframe navigations vs top-level navigations? Firefox has different behavior between noopener and noreferrer for targeted subframe navigations (https://html.spec.whatwg.org/#link-type-noreferrer).

  • When disowning an opener, should the opener still be reachable by name? Edge always allows windows to be reached by name, Chrome and Firefox don't.

@lucasgadani
Copy link
Author

lucasgadani commented Nov 2, 2017

Duplicate of #1826.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant