Export (0) Print
Expand All
10 out of 17 rated this helpful - Rate this topic

Using the Windows Runtime in JavaScript

When you write a Windows Store or Windows Phone Store app using JavaScript, 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.

You can find JavaScript reference documentation at JavaScript Language Reference.

Important note Important

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

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

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

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

  • Namespaces and classes are in Pascal case:

    Windows.Deployment.PackageInfo;
    
  • Members of classes, including methods and properties, and members of structures and enumerations, are in camel case:

    Deployment.PackageInfo.createPackage();
    
  • Event names are in lower case:

    dataTransferManager.ontargetapplicationchosen;
    
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.