WinJS.UI.IItemPromise interface

Applies to Windows and Windows Phone

Provides a mechanism for retrieving IItem objects asynchronously.

Syntax


This object can't be directly instantiated by your code.

Members

The IItemPromise interface has these types of members:

Events

The IItemPromise interface has these events.

EventDescription
onerror

Occurs when there is an error in processing.

 

Methods

The IItemPromise interface has these methods.

MethodDescription
cancel

Attempts to cancel the fulfillment of a promised value. If the promise hasn't already been fulfilled and cancellation is supported, the promise enters the error state with a value of Error("Canceled").

done

Allows you to specify the work to be done on the fulfillment of the promised value, the error handling to be performed if the promise fails to fulfill a value, and the handling of progress notifications along the way. After the handlers have finished executing, this function throws any error that would have been returned from then as a promise in the error state.

release

Stops change notification tracking for the IItem that fulfills this IItemPromise.

retain

Begins change notification tracking for the IItem that fulfills this IItemPromise.

then

Allows you to specify the work to be done on the fulfillment of the promised value, the error handling to be performed if the promise fails to fulfill a value, and the handling of progress notifications along the way.

 

Properties

The IItemPromise interface has these properties.

PropertyAccess typeDescription

handle

Read/write

Gets or sets the temporary ID of the IItem that fulfills this promise.

index

Read/write

Gets or sets the index of the IItem contained by this IItemPromise.

 

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.UI

See also

Promise

 

 

Show:
© 2014 Microsoft