WinJS.Promise.thenEach function

Performs an operation on all the input promises and returns a promise that has the shape of the input and contains the result of the operation that has been performed on each input.
Syntax
var promise = WinJS.Promise.thenEach(promises, completeFunction, errorFunction, progressFunction);
Parameters
- values
-
Type: Object
A set of values (which could be either an array or an object) of which some or all are promises..
- complete
-
Type: Function
The function to be called if the promise is fulfilled with a value. This function takes a single argument, which is the fulfilled value of the promise.
- error
-
Type: Function
The function to be called if the promise is fulfilled with an error. This function takes a single argument, which is the error value of the promise.
- progress
-
Type: Function
The function to be called if the promise reports progress. This function takes a single argument, which is the data about the progress of the promise. Promises are not required to support progress.
Return value
Type: Promise
A Promise that is the result of calling join on the values parameter.
Requirements
|
Minimum WinJS version |
WinJS 1.0 |
|---|---|
|
Namespace |
WinJS.Promise |
See also