- From: Robin Berjon <robin@berjon.com>
- Date: Thu, 25 Aug 2011 12:30:46 +0200
- To: Cameron McCormack <cam@mcc.id.au>
- Cc: Andreas Gal <gal@mozilla.com>, public-device-apis@w3.org
On Aug 25, 2011, at 07:00 , Cameron McCormack wrote:
> On 25/08/11 4:47 PM, Andreas Gal wrote:
>> How can I pass an optional options object here of type ContactFindOptions if I don't have a constructor in the bindings to instantiate one?
>
> As timeless says, this could be changed to a dictionary so that it works. That, or the [Callback] extended attribute needs to be on ContactFindOptions so that JS user objects can be considered to implement it -- then you can pass { filter: "whatever", multiple: true } to Contacts::find.
I think I like the dictionary solution better (but I won't fight for either option).
Andreas wrote:
> [NoInterfaceObject]
> interface
> Contacts
> {
> caller void find (DOMString[] fields, ContactFindCB successCB, optional ContactErrorCB errorCB, optional ContactFindOptions options);
> };
Andreas, it seems to me that you're reviewing the snapshot from http://www.w3.org/TR/contacts-api/. I think that you will find that the development version at http://dev.w3.org/2009/dap/contacts/ improves on it (diff: http://dev.w3.org/cvsweb/2009/dap/contacts/Overview.html.diff?r2=1.147&r1=1.158&f=h)
--
Robin Berjon - http://berjon.com/ - @robinberjon
Received on Thursday, 25 August 2011 10:31:31 UTC