Edit ACTION-135: Summarize the SuccessCallback patterns and use cases for each method (i.e. use Function or SuccessCallback(Message message))

Title:

State:

Person:

Due Date:

(accepts formats such as "2005-05-17", "+1 week", "14 August 2005" and "next Thursday")

Associated Issue:

Or Associated Product:

Add notes (no markup allowed, URIs get automatically hyperlinked):

Related emails:

  1. Draft F2F Minutes Day 3, 2010-03-18 (from frederick.hirsch@nokia.com on 2010-03-18) (from frederick.hirsch@nokia.com on 2010-03-18)

Related notes:

The use of [Callback=FunctionOnly] on the callback interfaces defined is explained clearly in the WebIDL specification @ http://dev.w3.org/2006/webapi/WebIDL/#Callback.

A method implementing these callbacks will accept a function. According to the WebIDL spec, the following are valid:

navigator.service.contacts.find("name", function() { /* success callback */} );

navigator.service.contacts.find("name", function(contacts) { /* success callback */} );

navigator.service.contacts.find("name", function(contacts) { /* success callback occurs here... */ onsuccess: function() { /* ...not here */ } } );

The following is not valid:

navigator.service.contacts.find("name", { onsuccess: function() { /* throws a TypeError */ } } );

Richard Tibbett, 4 Oct 2010, 15:46:44


Anssi Kostiainen <anssi.kostiainen@intel.com>, Reilly Grant <reillyg@google.com>, Chairs, Fuqiao Xue <xfq@w3.org>, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: index.php,v 1.326 2018/10/13 17:29:51 vivien Exp $