다음을 통해 공유


WinJS.UI.IItemPromise interface

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
  • Methods
  • Properties

Events

The IItemPromise interface has these events.

Event Description
onerror

Occurs when there is an error in processing.

 

Methods

The IItemPromise interface has these methods.

Method Description
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.

Property Access type Description

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 WinJS version

WinJS 3.0

Namespace

WinJS.UI

See also

Promise