-
Notifications
You must be signed in to change notification settings - Fork 49
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
Required steps for closing a notification are incompatible with some platforms #109
Comments
+1, because platforms are all over the place. On Mac OS X activation of the I believe that the Action Center on Windows issues an event when the notification dismisses to the notification center, but not when it moves away from there. On Android the event is not comprehensive too, given that there are reasons for notifications to close that won't cause the app to trigger, notably reboots or other apps clearing the list. @hober, would adding a phrase like "if the platform is able to" satisfy this issue? The event has significant value, even if its functionality is best effort. |
@beverloo That's definitely an improvement, but I'm not sure "if the platform is able to" goes far enough. Sites need to code to this API under the assumption that their code will not run when a notification is closed, since that's the case on several platforms. I'd prefer the text say that UAs MAY run these steps, with perhaps a Note saying it's quite unlikely on some platforms. |
I'm fine with that, as it reflects reality. I'll send a PR tomorrow. |
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
On some platforms when the user dismisses an app's notification without activating it, the app is never woken up to be told that. No client-side app code is run in this case; the app is only woken up upon activation of the notification.
Could the wording of §2.8 Closing a notification be loosened to allow for such cases?
The text was updated successfully, but these errors were encountered: