summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorportix <none@none>2013-01-17 00:20:25 +0100
committerportix <none@none>2013-01-17 00:20:25 +0100
commitf1ce5d9731bfc73325afef738ae275e84225a41d (patch)
tree0c3437f3aeeedbd5293e1ef977e2d11463bfc3bf /api
parent5055935a9dfa71f1ebf7a54873b997116636337c (diff)
downloaddwb-f1ce5d9731bfc73325afef738ae275e84225a41d.zip
Implemnting Deferred.always
Diffstat (limited to 'api')
-rw-r--r--api/dwb-js.727
-rw-r--r--api/jsapi.7.txt13
-rw-r--r--api/jsapi.txt21
3 files changed, 56 insertions, 5 deletions
diff --git a/api/dwb-js.7 b/api/dwb-js.7
index 9a51c580..8964b910 100644
--- a/api/dwb-js.7
+++ b/api/dwb-js.7
@@ -2,12 +2,12 @@
.\" Title: dwb-js
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\" Date: 01/09/2013
+.\" Date: 01/17/2013
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
-.TH "DWB\-JS" "7" "01/09/2013" "\ \&" "\ \&"
+.TH "DWB\-JS" "7" "01/17/2013" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -824,7 +824,7 @@ Executes a shell command using the default search path
The command to execute
.RE
.PP
-\fIstdin(String)\fR
+\fIstdout(String)\fR
.RS 4
Callback function for stdin, pass null if only stderr is needed, optional
.RE
@@ -1152,6 +1152,27 @@ Deferreds implement the following methods:
.nr an-break-flag 1
.br
.ps +1
+\fBvoid Deferred.always(Function callback)\fR
+.RS 4
+.sp
+Registers a function for then done and fail chain\&.
+.PP
+\fIcallback\fR
+.RS 4
+A callback function that will be called when the Deferred is resolved or rejected\&. If the function returns a deferred the original deferred will be replaced with the new deferred\&.
+.RE
+.PP
+\fIreturns\fR
+.RS 4
+A new deferred that can be used to chain callbacks\&.
+.RE
+.RE
+.sp
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
\fBvoid Deferred.done(Function callback)\fR
.RS 4
.sp
diff --git a/api/jsapi.7.txt b/api/jsapi.7.txt
index cc79f73b..ec361e4d 100644
--- a/api/jsapi.7.txt
+++ b/api/jsapi.7.txt
@@ -378,7 +378,7 @@ _returns_;; true if creation was successful or directory already existed
Executes a shell command using the default search path
_command_;; The command to execute
-_stdin(String)_;; Callback function for stdin, pass null if only stderr is
+_stdout(String)_;; Callback function for stdin, pass null if only stderr is
needed, optional
_stderr(String)_;; Callback function for stderr, optional
_returns_;; A deferred, it will be resolved if the child exits
@@ -533,6 +533,17 @@ the fail callback chain of the deferred is called.
Deferreds implement the following methods:
+==== void Deferred.always(Function callback)
+****
+
+Registers a function for then done and fail chain.
+
+_callback_;; A callback function that will be called when the Deferred is
+resolved or rejected. If the function returns a deferred the original deferred will be replaced with
+the new deferred.
+_returns_;; A new deferred that can be used to chain callbacks.
+****
+
==== void Deferred.done(Function callback)
****
diff --git a/api/jsapi.txt b/api/jsapi.txt
index 0de6b314..9ad2fe30 100644
--- a/api/jsapi.txt
+++ b/api/jsapi.txt
@@ -652,7 +652,7 @@ Executes a shell command using the default search path
::
_command_;; The command to execute
-_stdin(String)_;; Callback function for stdin, pass +null+ if only stderr is
+_stdout(String)_;; Callback function for stdin, pass +null+ if only stderr is
needed, optional
_stderr(String)_;; Callback function for stderr, optional
_returns_;; A deferred, it will be resolved if the child exits
@@ -1082,6 +1082,25 @@ Deferreds implement the following methods:
[source,javascript]
----
+Deferred Deferred.always(Function callback)
+----
+
+Registers a function for then done and fail chain.
+
+ ::
+
+_callback_;; A callback function that will be called when the Deferred is
+resolved or rejected. If the function returns a deferred the original deferred will be replaced with
+the new deferred.
+_returns_;; A new deferred that can be used to chain callbacks.
+****
+
+****
+[float]
+==== *done()* ====
+
+[source,javascript]
+----
Deferred Deferred.done(Function callback)
----