[whatwg] Notifications UI for Persistent Workers

Jonas Sicking jonas at sicking.cc
Wed Apr 1 14:41:28 PDT 2009


On Tue, Mar 31, 2009 at 6:48 PM, John Gregg <johnnyg at google.com> wrote:
> interface Notifications {
>  NotificationObject createHTMLNotification(URL url);
>  NotificationObject createNotification(StructuredNotification n);
>
>  /* see "Permissions" below */
>  readonly attribute boolean trusted;
>  void requestTrust();
> };
>
> In the Notifications interface, user agents may leave undefined
> createHTMLNotification() if they do not support HTML notifications.
>
> [nointerface] interface StructuredNotification {
>  DOMString title;
>  DOMString /* URL */ icon;
>  DOMString body;
>  /* ... perhaps other fields can be optional ... */
> };

I would avoid creating a new object for displaying stuff. We have HTML
which hopefully should be powerful enough ;)

Instead maybe add an API for creating a notification based on a html
string, or a node.

Also, I assume that these are different toasters from whatever UI is
used to ask for permission to install a persistent worker? You
definitely don't want to allow rich content in those.

/ Jonas



More information about the whatwg mailing list