WinJS Namespace

10 out of 20 rated this helpful - Rate this topic

The WinJS namespace provides special Windows Library for JavaScript functionality, including Promise and xhr.

Note  All Windows Library for JavaScript namespaces are listed together with the Windows Runtime API namespaces. This page provides only information about the WinJS namespace, not general Windows Library for JavaScript information.

The WinJS namespace has these types of members:

Objects

ObjectDescription

ErrorFromName object

An error object.

Promise object

Provides a mechanism to schedule work to be done on a value that has not yet been computed. It is an abstraction for managing interactions with asynchronous APIs.

For more information about asynchronous programming, see Asynchronous programming. For more information about promises in JavaScript, see Asynchronous programming in JavaScript.

For more information about using promises, see the Promise sample at Windows Store app samples.

 

Properties

PropertyDescription

validation property

Can be set to show the results of a validation process.

 

Functions

FunctionDescription

log method

You can provide an implementation of this method yourself, or use WinJS.Utilities.startLog to create one that logs to the JavaScript console.

strictProcessing function

This method has been deprecated. You should use WinJS.Binding.optimizeBindingReferences instead.

xhr function

Wraps calls to XMLHttpRequest in a promise.

 

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

 

 

Build date: 12/5/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.