diff --git a/notifications.bs b/notifications.bs
index 36bc8f5..a0c463f 100644
--- a/notifications.bs
+++ b/notifications.bs
@@ -60,6 +60,9 @@ or "rtl
").
A notification has an associated body (a string). +
A notification has an associated navigation URL +(null or a URL). It is initially null. +
A notification has an associated tag (a string).
A notification has an associated data (a @@ -137,6 +140,9 @@ support these features might ignore them.
Set notification's body to options["{{NotificationOptions/body}}"]. +
If options["{{NotificationOptions/navigate}}"] exists, then + parse it using baseURL, and if that does not return failure, set + notification's navigation URL to the return value. (Otherwise + notification's navigation URL remains null.) +
Set notification's tag to options["{{NotificationOptions/tag}}"]. @@ -270,6 +281,11 @@ important information through, e.g., loss of color or clipped corners.
Set action's title to entry["{{NotificationAction/title}}"]. +
If entry["{{NotificationAction/navigate}}"] exists, then + parse it using baseURL, and if that does not return failure, + set action's navigation URL to the return value. + (Otherwise action's navigation URL remains null.) +
If entry["{{NotificationAction/icon}}"] exists, then parse it using baseURL, and if that does not return failure, set action's icon URL to the return value. (Otherwise @@ -541,18 +557,51 @@ interpreted as a language tag. Validity or well-formedness are not enforced. [[! platform supports activation, the user agent must (unless otherwise specified) run these steps:
Let action be null. + +
If one of notification's actions was activated by the end + user, then set action to that notification action. + +
Let navigationURL be notification's + navigation URL. + +
If action is non-null, then set navigationURL to action's + navigation URL. + +
This intentionally makes it so that when a notification action's
+ navigation URL is null, it falls through to the
+ click
event, providing more flexibility to the web developer.
+
+
If navigationURL is non-null: + +
If there is an existing top-level traversable traversable within + the user agent's top-level traversable set whose + active document's URL equals + navigationURL with exclude fragments set to true, then + navigate traversable to navigationURL and return. If there are + multiple top-level traversables that satisfy the condition the user agent has to + pick one in an implementation-defined manner. + + +
Create a fresh top-level traversable given navigationURL. + +
Return. +
If notification is a persistent notification, then:
Let action be the empty string. +
Let actionName be the empty string. -
If one of notification's actions was activated by the - user, then set action to that notification action's +
If action is non-null, then set actionName to action's name.
notificationclick
" given
- notification and action.
+ notification and actionName.
The body
getter steps are to return
this's notification's body.
+
The navigate
getter steps are:
+
+
If this's notification's navigation URL is null, then + return the empty string. + +
Return this's notification's navigation URL, + serialized. +
The tag
getter steps are to return
this's notification's tag.
@@ -925,6 +987,10 @@ then return null.
Set action["{{NotificationAction/title}}"] to entry's title. +
If entry's navigation URL is non-null, then + set action["{{NotificationAction/navigate}}"] to entry's + navigation URL, serialized. +
If entry's icon URL is non-null, then set action["{{NotificationAction/icon}}"] to entry's icon URL, serialized.