-
Notifications
You must be signed in to change notification settings - Fork 313
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
spec exactly how to order non-window Client objects #887
Comments
Your words are good and I agree with them all. |
Perhaps even more generally: if there is a tie in |
Pre F2F notes: Agree on ordering |
F2F: Wot Ben said. |
Webkit would prefer ordering only on creation time. Focus time would be much trickier for us, and we're not sure what benefit it would add. |
I believe it has to do with the fact that the most likely to be picked for focusing or navigating after a notification is clicked would be the window client that was most recently in focus. |
We could easily do:
|
I missed these comments during the F2F sorry! I think the common case is: // in reaction to a notification click:
clients.matchAll().then(allClients => {
const client = allClients.find(c => new URL(c.url).pathname == '/chat/');
if (client) return client.focus();
return clients.openWindow('/chat/');
}); If the user had two I'd be happy if the order was:
And add a note to encourage browsers to order the windows & non-windows on relevancy descending. This would allow browsers to give priority to a visible window on an active desktop etc. WDYT @beverloo? |
Resolution:
|
Just to clarify, "all clients" do not include non-window clients, correct? |
Since non-window clients cannot be focused they'll always be at the end of the list. @wanderview's original comment sums it up better than I did. |
The
Clients.matchAll()
spec requires windows to be ordered so that most recently focused windows come first. This should also specify how to order non-window Clients.This could probably as simple as:
The text was updated successfully, but these errors were encountered: