W3C home > Mailing lists > Public > public-web-intents@w3.org > June 2012

Re: Gallery API draft review request

From: Robin Berjon <robin@berjon.com>
Date: Wed, 20 Jun 2012 12:58:53 +0200
Cc: WebIntents <public-web-intents@w3.org>
Message-Id: <24C0BD41-39FF-4F7E-B11E-E7E1849A3B98@berjon.com>
To: Greg Billock <gbillock@google.com>
On May 22, 2012, at 20:52 , Greg Billock wrote:
> One piece of feedback we've gotten on the API is that we should be
> able to enumerate the extra data fields (i.e. returning a dictionary
> there instead of the getExtra() function). My concern about that is
> that it's a bit ambiguous how that relates to Javascript, and that's
> why we don't see APIs use that pattern. Is there a good way around
> that difficulty?

I've been looking at this again and it made me wonder: is there a reason why this is exposed as getExtra(key) rather than simply having a readonly attribute any extras that would expose the whole thing as a dictionary? I may be missing something, but that would seem to give us good JS integration, enumeration, etc. free. What were the concerns that led to using an accessor here?

Robin Berjon - http://berjon.com/ - @robinberjon
Received on Wednesday, 20 June 2012 10:59:26 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:14:47 UTC