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

Add a warning about the reliability of the notificationclose event #111

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

beverloo
Copy link
Member

@beverloo beverloo commented Oct 20, 2017

Not all platforms dispatch an event to the applications (e.g. the user
agent) when a notification is dismissed, or only do so in a subset of
cases. This means that the notificationclose event is a best-effort
event. It adds significant value to the developer, as dismissal is a
powerful (yet complicated) signal, so user agents should still make an
effort to support it where they can.

Fixes #109


Preview | Diff

Not all platforms dispatch an event to the applications (e.g. the user
agent) when a notification is dismissed, or only do so in a subset of
cases. This means that the `notificationclose` event is a best-effort
event. It adds significant value to the developer, as dismissal is a
powerful (yet complicated) signal, so user agents should still make an
effort to support it where they can.

Fixes whatwg#109
@beverloo
Copy link
Member Author

PTAL @annevk and @hober

I decided to not amend the algorithm as the user agent would not know about either closing of the notification, or about whether it was user triggered, when this situation arises. Does that sound reasonable?

@hober
Copy link

hober commented Oct 23, 2017

The proposed change leaves the RFC 2119 MUST in place, though. I don't think this change is sufficient.

@beverloo
Copy link
Member Author

Just changing the MUST to SHOULD imposes a significant change to the list of notifications concept. It would either be stale as deletion becomes optional (how will getNotifications() behave?) or would become a shared responsibility between the user agent and the underlying platform notification center. The second option means that the user agent will be aware of closed notifications, just not in a timely manner.

Instead, maybe we should somehow rephrase the event dispatching section (2.8.2.) to be limited to situations where the UA does know in a timely manner?

@annevk
Copy link
Member

annevk commented Oct 25, 2017

Maybe something like:

When a notification is closed, either by the underlying notification platform or by the user, and the underlying notification platform exposes notification closure, the close steps for it must be run.

Base automatically changed from master to main January 15, 2021 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Required steps for closing a notification are incompatible with some platforms
3 participants