From 724cc96909d802ade31f65667117e925e200777b Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Fri, 18 Oct 2024 14:51:01 -0700 Subject: [PATCH] rename to navigate --- notifications.bs | 53 ++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/notifications.bs b/notifications.bs index ea8086b..d88a1cc 100644 --- a/notifications.bs +++ b/notifications.bs @@ -60,8 +60,8 @@ or "rtl").

A notification has an associated body (a string). -

A notification has an associated URL (null or a -URL). It is initially null. +

A notification has an associated navigation URL (null or +a URL). It is initially null.

A notification has an associated tag (a string). @@ -139,7 +139,7 @@ for an end user. Each action has an associated:

title
A string. -
URL +
navigation URL
Null or a URL. It is initially null.
icon URL @@ -225,10 +225,10 @@ clipped corners.
  • Set notification's body to options["{{NotificationOptions/body}}"]. -

  • If options["{{NotificationOptions/url}}"] exists, then +

  • If options["{{NotificationOptions/navigate}}"] exists, then parse it using baseURL, and if that does not return failure, set - notification's URL to the return value. (Otherwise - notification's URL remains null.) + notification's navigation URL to the return value. (Otherwise + notification's navigation URL remains null.)

  • Set notification's tag to options["{{NotificationOptions/tag}}"]. @@ -280,10 +280,10 @@ clipped corners.

  • Set action's title to entry["{{NotificationAction/title}}"]. -

  • If entry["{{NotificationAction/url}}"] exists, then +

  • If entry["{{NotificationAction/navigate}}"] exists, then parse it using baseURL, and if that does not return failure, - set action's URL to the return value. (Otherwise action's - URL remains null.) + 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, @@ -560,21 +560,22 @@ platform supports activation, the user agent must (unless otherwise specified) r

  • If one of notification's actions was activated by the end user, then set action to that action. -

  • Let url be notification's URL. +

  • Let navigationURL be notification's + navigation URL.

  • -

    If action is non-null, then set url to action's - URL. +

    If action is non-null, then set navigationURL to action's + navigation URL.

    This intentionally makes it so that when an action's - URL is null, it falls through to the click event, providing more - flexibility to the web developer. + navigation URL is null, it falls through to the click event, + providing more flexibility to the web developer.

  • -

    If url is non-null: +

    If navigationURL is non-null:

      -
    1. Create a fresh top-level traversable given url. +

    2. Create a fresh top-level traversable given navigationURL.

    3. Return. @@ -681,7 +682,7 @@ interface Notification : EventTarget { readonly attribute NotificationDirection dir; readonly attribute DOMString lang; readonly attribute DOMString body; - readonly attribute USVString url; + readonly attribute USVString navigate; readonly attribute DOMString tag; readonly attribute USVString image; readonly attribute USVString icon; @@ -701,7 +702,7 @@ dictionary NotificationOptions { NotificationDirection dir = "auto"; DOMString lang = ""; DOMString body = ""; - USVString url; + USVString navigate; DOMString tag = ""; USVString image; USVString icon; @@ -730,7 +731,7 @@ enum NotificationDirection { dictionary NotificationAction { required DOMString action; required DOMString title; - USVString url; + USVString navigate; USVString icon; }; @@ -894,13 +895,13 @@ return the maximum number of actions supported.

      The body getter steps are to return this's notification's body. -

      The url getter steps are: +

      The navigate getter steps are:

        -
      1. If this's notification's URL is null, then return the - empty string. +

      2. If this's notification's navigation URL is null, then + return the empty string. -

      3. Return this's notification's URL, +

      4. Return this's notification's navigation URL, serialized.

      @@ -976,9 +977,9 @@ then return null.
    4. Set action["{{NotificationAction/title}}"] to entry's title. -

    5. If entry's URL is non-null, then set - action["{{NotificationAction/url}}"] to entry's URL, - serialized. +

    6. If entry's navigation URL is non-null, then set + action["{{NotificationAction/navigate}}"] to entry's + navigation URL, serialized.

    7. If entry's icon URL is non-null, then set action["{{NotificationAction/icon}}"] to entry's