diff --git a/Makefile b/Makefile deleted file mode 100644 index 4aeb682..0000000 --- a/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -all: notifications.html - -notifications.html: notifications.bs Makefile - bikeshed spec diff --git a/notifications.bs b/notifications.bs index 0020e6b..7d82122 100644 --- a/notifications.bs +++ b/notifications.bs @@ -15,6 +15,7 @@ Indent: 2 +

Terminology

@@ -435,7 +436,7 @@ interface Notification : EventTarget { readonly attribute DOMString tag; readonly attribute USVString icon; readonly attribute USVString sound; - // vibrate not exposed for now; see bug 23682 + readonly attribute FrozenArray<unsigned long> vibrate; readonly attribute boolean renotify; readonly attribute boolean silent; readonly attribute boolean noscreen; @@ -620,6 +621,11 @@ getter must return the notification's there is no notification's sound URL otherwise. +

The vibrate attribute's getter +must return the +notification's vibration pattern, if any, and the +empty list otherwise. +

The renotify attribute's getter must return the notification's renotify preference flag. @@ -770,9 +776,9 @@ method, when invoked, must run these steps:

  • Return promise. -

    The -getNotifications(filter) method, when invoked, must run these -steps: +

    The +getNotifications(filter) +method, when invoked, must run these steps:

    1. Let promise be a new promise. @@ -859,18 +865,19 @@ Olli Pettay, Peter Beverloo, Reuben Morais, Rich Tibbett, +Sanghyun Park, Simon Pieters, and timeless for being awesome.

      This standard is written by -Anne van Kesteren -(Mozilla, +Anne van Kesteren +(Mozilla, annevk@annevk.nl). An earlier iteration was written -by John Gregg (Google, +by John Gregg (Google, johnnyg@google.com). -

      Per CC0, to +

      Per CC0, to the extent possible under law, the editors have waived all copyright and related or neighboring rights to this work. @@ -929,7 +936,7 @@ urlPrefix: http://www.w3.org/TR/vibration/ text: perform vibration text: validate and normalize urlPrefix: #idl-def-; type: interface - text: VibratePattern + text: VibratePattern; url: VibratePattern

      @@ -973,5 +980,3 @@ urlPrefix: http://www.w3.org/TR/vibration/
           }
       }
       
      - - diff --git a/notifications.html b/notifications.html index 2dfa62a..24fe9a8 100644 --- a/notifications.html +++ b/notifications.html @@ -30,7 +30,7 @@

      Notifications API

      Living Standard — Last Updated -

      +
      @@ -114,6 +114,8 @@

      + +

      1. Terminology

      @@ -133,7 +135,7 @@

      notification is an abstract -representation of an occurrence, such as the delivery of a message. +representation of something that happened, such as the delivery of a message.

      A notification has an associated @@ -194,9 +196,8 @@

      service worker registration.

      -

      Developers are encouraged to not convey information through an -icon, sound, or vibration pattern that is not otherwise accessible to the end -user. +

      Developers are encouraged to not convey information through an icon, sound, +or vibration pattern that is not otherwise accessible to the end user.

      A non-persistent notification is a @@ -411,7 +412,7 @@

      title and body. Each is expected to be treated as an independent set of one or more bidirectional algorithm paragraphs when displayed, as defined by the bidirectional algorithm’s rules P1, P2, and -P3, including, for instance, supporting the paragraph-breaking behaviour of +P3, including, for instance, supporting the paragraph-breaking behavior of U+000A LINE FEED (LF) characters. For each paragraph of the title and body, the notification’s @@ -637,7 +638,7 @@

    2. Display notification on the device (e.g. by calling the - appropriate notification platform). + appropriate notification platform API).

      At this point also play notification’s sound resource, if @@ -685,11 +686,11 @@

      3. API

      -
      [Constructor(DOMString title, optional NotificationOptions options),
      +   
      [Constructor(DOMString title, optional NotificationOptions options),
        Exposed=(Window,Worker)]
       interface Notification : EventTarget {
         static readonly attribute NotificationPermission permission;
      -  [Exposed=Window] static void requestPermission(optional NotificationPermissionCallback callback);
      +  [Exposed=Window] static void requestPermission(optional NotificationPermissionCallback callback);
       
         attribute EventHandler onclick;
         attribute EventHandler onerror;
      @@ -701,7 +702,7 @@ 

      3. tag; readonly attribute USVString icon; readonly attribute USVString sound; - // vibrate not exposed for now; see bug 23682 + readonly attribute FrozenArray<unsigned long> vibrate; readonly attribute boolean renotify; readonly attribute boolean silent; readonly attribute boolean noscreen; @@ -718,7 +719,7 @@

      3. tag = ""; USVString icon; USVString sound; - VibratePattern vibrate; + VibratePattern vibrate; boolean renotify = false; boolean silent = false; boolean noscreen = false; @@ -744,12 +745,12 @@

      3. A non-persistent notification is represented one Notification objects and can be created through Notification's -constructor. +constructor.

      A persistent notification is represented by zero or more Notification objects can be created through the -showNotification() method. +showNotification() method.

      3.1. Garbage collection

      @@ -765,8 +766,8 @@

      3.2. Constructors

      -

      The Notification(title, options) - constructor, when invoked, must (unless otherwise indicated) run +

      The Notification(title, options) + constructor, when invoked, must (unless otherwise indicated) run these steps:

      @@ -836,8 +837,8 @@

    3. IDL Index

      -
      [Constructor(DOMString title, optional NotificationOptions options),
      +  
      [Constructor(DOMString title, optional NotificationOptions options),
        Exposed=(Window,Worker)]
       interface Notification : EventTarget {
         static readonly attribute NotificationPermission permission;
      -  [Exposed=Window] static void requestPermission(optional NotificationPermissionCallback callback);
      +  [Exposed=Window] static void requestPermission(optional NotificationPermissionCallback callback);
       
         attribute EventHandler onclick;
         attribute EventHandler onerror;
      @@ -1481,7 +1491,7 @@ 

      IDL Inde readonly attribute DOMString tag; readonly attribute USVString icon; readonly attribute USVString sound; - // vibrate not exposed for now; see bug 23682 + readonly attribute FrozenArray<unsigned long> vibrate; readonly attribute boolean renotify; readonly attribute boolean silent; readonly attribute boolean noscreen; @@ -1498,7 +1508,7 @@

      IDL Inde DOMString tag = ""; USVString icon; USVString sound; - VibratePattern vibrate; + VibratePattern vibrate; boolean renotify = false; boolean silent = false; boolean noscreen = false; @@ -1525,11 +1535,11 @@

      IDL Inde }; partial interface ServiceWorkerRegistration { - Promise<void> showNotification(DOMString title, optional NotificationOptions options); - Promise<sequence<Notification>> getNotifications(optional GetNotificationOptions filter); + Promise<void> showNotification(DOMString title, optional NotificationOptions options); + Promise<sequence<Notification>> getNotifications(optional GetNotificationOptions filter); }; -[Constructor(DOMString type, optional NotificationEventInit eventInitDict), +[Constructor(DOMString type, optional NotificationEventInit eventInitDict), Exposed=ServiceWorker] interface NotificationEvent : ExtendableEvent { readonly attribute Notification notification;