EN
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.

WinJS.Promise.thenEach function

Applies to Windows and Windows Phone

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 supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1

Namespace

WinJS.Promise

Library

Base.js

See also

Promise

 

 

Anzeigen:
© 2014 Microsoft