-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Meta: export terms for Notifications API #10715
Conversation
I'm not very happy to not specify that algorithm but maybe that's off topic here. |
What would you suggest to say instead? The way tabs are presented and the ordering they have seems quite implementation-defined material to me. |
I think this should not have the
Are you absolutely sure you want current, not active? Most things on the platform use active, and that represents what the user sees.
Exporting this seems very reasonable
Exporting this also seems reasonable. Although, I wonder about this alternate approach?
In theory the active session history entry's URL should always be in sync with the document's URL. (In practice there are some edge cases in some browsers around |
But still web visible, right? One can listen on visibilitychange event and guess the algorithm (whether the browser selects the last visible tab) for example. At least we should have some non-normative guide even if it's not fully spec-able. |
@domenic thank you! I'll update this PR for your "active document" suggestion, which all around seems much better. @saschanaz I'm not really sure what guidance we would give. This seems like the kind of thing to sort through with more deployment experience, but I honestly doubt it'll come up much. |
The guide could be about what the initial implementations are planning to do for tab selection. |
Needed by the Notifications API: whatwg/notifications#213.
863bd83
to
3ca12ab
Compare
I still don't really see how that makes sense as it's also highly dependent on how that implementation opens tabs and such. A web application doesn't know the tab order between its tabs. |
It doesn't know the visual tab order, if that's what Apple is planning to depend on. It does know which tab got the most recent user interaction / focus / etc. |
But anyway I'm not very familiar with navigable, maybe @smaug---- is a better person for this PR. A dumb question: with the proposed behavior, would it be possible to have SPA-like behavior where the existing JS context is used with the new history entry? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do think there's been a good discussion here about whether we can specify the notifications API algorithm in more detail, but it should probably happen over in the notifications API repo, instead of this meta PR :)
I'll merge this now.
In particular: a navigable's current session history entry, a user agent's top-level traversable set, and a session history entry's URL.
This is the use case I have for this in whatwg/notifications#213 (PR does not contain the long paragraph at the moment as it would result in issues):
/document-sequences.html ( diff )