W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2010

Re: Notifications

From: Robert O'Callahan <robert@ocallahan.org>
Date: Thu, 11 Feb 2010 11:33:07 +1300
Message-ID: <11e306601002101433o1e14181cm3408c1ad6fdaf25@mail.gmail.com>
To: Drew Wilson <atwilson@google.com>
Cc: Henri Sivonen <hsivonen@iki.fi>, John Gregg <johnnyg@google.com>, Olli@pettay.fi, public-webapps <public-webapps@w3.org>
On Thu, Feb 11, 2010 at 11:10 AM, Drew Wilson <atwilson@google.com> wrote:

> One of the suggestions made previously on this thread was to coalesce
> createNotification() and createHTMLNotification() into a single API with an
> optional HTML parameter - this would allow UAs on systems with
> Growl/NotifyOSD to ignore the HTML parameter passed in, and only display the
> text + icon information through the appropriate system framework. This also
> addresses concerns expressed on WHATWG that platforms that don't support
> createHTMLNotification() would break the web because web applications would
> fail to check for the existence of HTML support before calling these APIs -
> UAs would always have a useful fallback.
>

The problem with that is that authors who test with a system that supports
HTML notifications could easily provide the wrong non-HTML message, or no
message at all, and not notice. It also forces authors to say things twice.

I think a better way to go would be to support a restricted subset of HTML,
and then consider how the UA should extract text for a plaintext-only
notification framework (possibly opting to fall back to non-native
notifications if the text extraction doesn't work). For example, you could
allow only <b> and <img> elements, and for text-only notifications you would
strip <b> and use the alt text for <img>, and if the author didn't provide
alt text for <img> then and only then you would fall back to non-native
notifications.

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]
Received on Wednesday, 10 February 2010 22:33:41 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:37 GMT