[whatwg] Notifications UI for Persistent Workers

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

Received on Wednesday, 1 April 2009 14:41:28 UTC