Using the Windows Runtime in JavaScript

When you write a Universal Windows Platform (UWP) app, you can use Windows Runtime classes, methods, and properties in much the same way that you would use native JavaScript objects, methods, and properties. This topic provides introductory information and links to topics that explain the basic concepts of using Windows Runtime APIs in JavaScript, including an explanation of how Windows Runtime types are represented, how to use asynchronous Windows Runtime methods, and how to listen to and handle Windows Runtime events.

For general language documentation, check out MDN's JavaScript reference library.


Windows Runtime features are not available for apps that run in Internet Explorer.

Windows Runtime Reference Documentation

For reference documentation, see Windows Runtime Reference. Code examples are available in JavaScript and also in C++, C#, and Visual Basic.

Writing Windows Runtime Components in C++, C#, or Visual Basic

For instructions and guidelines for writing Windows Runtime components that can be consumed in JavaScript, see Creating Windows Runtime Components in C++ and Creating Windows Runtime Components in C# and Visual Basic.

Casing Conventions with Windows Runtime Features

Casing conventions for Windows Runtime features in JavaScript differ slightly from those for other languages:

  • Namespaces and classes are in Pascal case:

  • Members of classes, including methods and properties, and members of structures and enumerations, are in camel case:

  • Event names are in lower case:


See Also

Considerations when Using the Windows Runtime API
Using Windows Runtime Asynchronous Methods
Handling Windows Runtime Events in JavaScript
JavaScript Representation of Windows Runtime Types
JavaScript Projection of Windows Runtime DateTime and TimeSpan