W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2013

Re: [whatwg] Implementation question about Notifications

From: Anne van Kesteren <annevk@annevk.nl>
Date: Mon, 18 Nov 2013 20:01:07 +0800
Message-ID: <CADnb78ic2pY9XnaCwMWfFESjg7mRmCbdnFZ6oK=FNFCeQ6k=+A@mail.gmail.com>
To: Andrew Wilson <atwilson@google.com>
Cc: Peter Beverloo <peter@chromium.org>, WHATWG List <whatwg@whatwg.org>
On Thu, Nov 14, 2013 at 10:45 PM, Andrew Wilson <atwilson@google.com> wrote:
> var n1 = new Notification("title");
> var n2 = new Notification("title", {icon: "invalid_icon_url"});
> var n3 = new Notification("title", {icon: "http://non-existent-icon.com"});
>
> I think that it should be:
>
> n1.dir == "auto"
> n1.lang == ""
> n1.body === undefined
> n1.tag === undefined
> n1.icon === undefined
>
> Do you agree? Or should it map to something different?

If we want to treat empty string different from missing for
body/tag/icon we could make them nullable. Not sure that's worth it
though. Shall I clarify the specification that they should be the
empty string as well?


> What about n2.icon and n3.icon - what should they read? I'm curious, given
> that section 4.9.1 reads:

Well, "invalid_icon_url" is not an invalid URL, but if you had used
e.g. "http://test:test/" it would have to return the same as n1.
n3.icon should return "http://non-existent-icon.com/" per
http://notifications.spec.whatwg.org/#dom-notification-icon


> I'm not certain if "set notification's icon" refers to just the visible
> image within the notification, or to the *Notification.icon* attribute
> itself - I'm assuming the former (since we don't want to wait for a network
> fetch before setting the Notification.icon attribute) so perhaps we should
> rephrase this as "set notification's icon image to the decoded resource"?

Done.


-- 
http://annevankesteren.nl/
Received on Monday, 18 November 2013 12:01:38 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:14 UTC