From 26b475119e14a0cd3e0a202a7460f7c4d3bdd4e9 Mon Sep 17 00:00:00 2001 From: portix Date: Thu, 20 Dec 2012 12:45:56 +0100 Subject: Renaming _js_array_iterator -> js_array_iterator --- api/jsapi.txt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/jsapi.txt b/api/jsapi.txt index f6122dde..ac8a530d 100644 --- a/api/jsapi.txt +++ b/api/jsapi.txt @@ -1156,8 +1156,23 @@ _returns_;; A new deferred that can be used to chain callbacks. ==== *Examples* ==== -Simple usage of a deferred: +The builtin function system.spawn returns a deferred: +[source,javascript] +--------------------------------- +system.spawn("command").then( + function() + { + /* called when execution was successful */ + }, + function(errorcode) + { + /* called when execution wasn't successful */ + } +); +--------------------------------- + +Simple usage of a deferred: [source,javascript] --------------------------------- function loadUri(uri) { -- cgit v1.2.3