EN
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.
4 von 8 fanden dies hilfreich - Dieses Thema bewerten.

Promise.wrap method

Wraps a non-promise value in a promise. This method is like wrapError, which allows you to produce a Promise in error conditions, in that it allows you to return a Promise in success conditions.

Syntax


promise.wrap(value).done( /* Your success and error handlers */ );

Parameters

value

Type: object

Some non-promise value to be wrapped in a promise.

Return value

Type: Promise

A promise that is successfully fulfilled with the specified value.

Remarks


WinJS.Promise.wrap(nonPromise);

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Namespace

WinJS

Library

Base.js

See also

Promise

 

 

Build date: 12/5/2012

© 2013 Microsoft. Alle Rechte vorbehalten.