Contacts API -- ContactFindOptions

ContactFindOptions is defined as follows:

4.8 ContactFindOptions interface

[NoInterfaceObject]
interface ContactFindOptions
 {
    attribute DOMString? filter;
    attribute boolean? multiple;
};

WebIDL defines [NoInterfaceObject] as follows:

4.3.9. [NoInterfaceObject]

If the [NoInterfaceObject] extended attribute appears on an interface, it indicates that an interface object will not exist for the interface in the ECMAScript binding. Similarly, if it appears on an exception it indicates that an exception interface object will not exist for the exception in the ECMAScript binding.

The [NoInterfaceObject] extended attribute MUST take no arguments.

If the [NoInterfaceObject] extended attribute is specified on an interface, then the [Constructor] extended attribute MUST NOT also be specified on that interface. A [NamedConstructor] extended attribute is fine, however.

See section 4.2.16 and section 4.9 for the specific requirements that the use of [NoInterfaceObject] entails.

The Contacts API uses ContactFindOptions as follows:

4.2 Contacts interface

[NoInterfaceObject]
interface 
Contacts
 {
    caller void find (DOMString[] fields, ContactFindCB successCB, optional ContactErrorCB errorCB, optional ContactFindOptions options);
};

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?

Andreas

Received on Thursday, 25 August 2011 04:48:12 UTC