promise/first

dojo/promise/first

Summary

Takes multiple promises and returns a new promise that is fulfilled when the first of these promises is fulfilled.

Takes multiple promises and returns a new promise that is fulfilled when the first of these promises is fulfilled. Canceling the returned promise will not cancel any passed promises. The promise will be fulfilled with the value of the first fulfilled promise.

Usage

first(objectOrArray);
Parameter Type Description
objectOrArray Object | Array
Optional

The promises are taken from the array or object values. If no value is passed, the returned promise is resolved with an undefined value.

Returns: dojo/promise/Promise

See the dojo/promise/first reference documentation for more information.

Methods

© 2005–2015 The Dojo Foundation
Licensed under the AFL 2.1 and BSD 3-Clause licenses.
http://dojotoolkit.org/api/1.10/dojo/promise/first.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部