Labs/Contacts/ContentAPI: Difference between revisions

Jump to navigation Jump to search
Line 51: Line 51:
== Deltas from W3C Contacts API ==
== Deltas from W3C Contacts API ==


The W3C Device APIs and Policy Working Group is working to standardize a Contacts API for web-enabled devices; you can [http://www.w3.org/TR/contacts-api/| read the latest draft here].
The W3C Device APIs and Policy Working Group is working to standardize a Contacts API for web-enabled devices; you can [http://www.w3.org/TR/contacts-api/ | read the latest draft here].


The Firefox implementation is lagging behind that API a bit; notable differences include:
The Firefox implementation is lagging behind that API a bit; notable differences include:


* W3C service point is navigator.service.contacts.find
* W3C API does not define default value for the "multiple" option should it be omitted. The Firefox implementation has it to be true.
* W3C API puts <tt>fields</tt> first, and makes filter a subproperty of the <tt>options</tt> (fourth) argument
* W3C API includes a multiple/single selector, and implies that the success callback will receive a single contact in the single case.
* W3C API includes "save", "remove", and "clone" operations.
* W3C API includes "save", "remove", and "clone" operations.
* W3C API includes a number of more complex search operations (and weighting rules) than what is currently supported in the add-on.
* W3C API includes error codes rather than strings for error callbacks
* W3C API includes error codes rather than strings for error callbacks
* W3C API includes an "updatedSince" option to <tt>find</tt>


== Experimental "Services" API ==
== Experimental "Services" API ==
11

edits

Navigation menu