W3C home > Mailing lists > Public > public-device-apis@w3.org > September 2010

Re: PendingOperation (was Re: CfC: The Media Capture API FPWD)

From: Ilkka Oksanen <Ilkka.Oksanen@nokia.com>
Date: Wed, 22 Sep 2010 14:17:56 +0300
Message-ID: <4C99E5E4.9080701@nokia.com>
To: ext Rich Tibbett <rich.tibbett@gmail.com>
CC: Robin Berjon <robin@robineko.com>, "public-device-apis@w3.org" <public-device-apis@w3.org>
Hi Rich,

21/09/2010 14:03, ext Rich Tibbett kirjoitti:
> I took a stab at adding this second part in to the latest Contacts 
> API ED. The CVS diff log is here: 
> http://dev.w3.org/cvsweb/2009/dap/contacts/Overview.html.diff?r1=1.87&r2=1.88&f=h
> I'm unclear whether we can (or you intended to) make
> PendingOperation the single event source for both success and error
> callbacks or whether we need separate event sources for each (the
> callback interfaces themselves). I opted for the former which will
> require changes to the Core Device Specification to reflect
> PendingOperations status as an event source.
> Anyway, it's just a stab and if I got this right the first time 
> around I'd be quite surprised.

Thanks for leading the way! I just checked the CVS diff and have couple

- In the current draft event handlers are part of ContactFindCB and
ContactErrorCB interfaces. How can I obtain instances of them to be able
to define my own event handler functions? Am I confused or should the
PendingOperation actually be an EventTarget? Then this would be possible:

var mypendingoperation =
navigator.service.contacts.find(['name','emails'], {filter: 'Bob'});
mypendingoperation.onSuccess = successContactFindCallback;
mypendingoperation.onError = generalErrorCB;

Which is similar to how e.g. Indexed Database API do things.

- Does event loop/task queue integration have any benefits for a web
developer? Geolocation API seems to be fine without the integration. Is
it still possible for casual developer to create e.g. NPAPI plugin that
implements some of the DAP APIs. Or does it mean that DAP APIs need to
be a more integral part of the browser engines instead?

- "DOM attribute" should be "IDL attribute"?

Received on Wednesday, 22 September 2010 11:19:10 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:53:46 UTC