Contact emails
Spec
https://notifications.spec.whatwg.org/#actions
No tag review, as this is a small addition to an existing spec.
Summary
Support for the NotificationOptions.actions, NotificationEvent.action and Notification.maxActions attributes, which allow authors to show action buttons alongside a notification.
The Notification.actions attribute will not be shipped yet, rather like we didn't ship Notification.vibrate, since Chrome does not yet support FrozenArray. It's only a convenience attribute though, and the parts being shipped form a coherent whole without it.
We haven't yet spec'ed or implemented icons for action buttons, but those will likely be added later.
Motivation
These allow users to quickly handle the most common tasks for a particular notification, without having to open the originating website.
Link to “Intent to Implement” blink-dev discussion
https://groups.google.com/a/chromium.org/d/topic/blink-dev/6tlbJW0NjEA/discussion
Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
All except WebView, since notifications aren't yet supported there.
Demo link
Sample code: https://notifications.spec.whatwg.org/#using-actions
Demo: https://tests.peter.sh/notification-generator/ (currently requires --enable-blink-features=NotificationExperimental before Actions can be used).
Debuggability
Breakpoints can be set in the notificationclick event as usual.
Compatibility Risk
Firefox: Public support
Internet Explorer: No public signals
Safari: No public signals
Web developers: Strongly positive
Availability and presentation of action buttons may vary across platforms (Android 4.1+, iOS 8+, Windows 10 and OS X 10.10+ natively support action buttons, but older OSes may not; Chrome is unaffected, since we render our own notifications on desktop).
Developers can feature-detect action support using the Notification.maxActions property. Additionally, the spec recommends that authors provide equivalent functionality via alternative UI.
OWP launch tracking bug
Entry on the feature dashboard
https://www.chromestatus.com/features/5906566364528640Non-OWNER lgtm
This is an important feature frequently used by native apps, and a frequently heard request from both developers and partners.
While the omission of Notification.actions is unfortunate, it won't limit developers in providing functionality because of the NotificationEvent.action attribute.
However, we need to be cautious to not end up with too many partially shipped features because of not supporting FrozenArray<>. There's a bug tracking adding support for it.
Thanks,
Peter
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
LGTM1Has there been a tag review for notifications in general yet? I agree we don't want to send each little addition to the TAG, they should probably have a look at the spec all together at some point.