UWP Tips & Tricks #2 – How to Enable Windows Runtime access from JavaScript in the Windows 10 Hosted Web App ?

You can interact with the Windows Runtime API from your JavaScript code when the hosted content is app is running as app on Windows 10.

How to Enable Windows Runtime access from JavaScript in the Windows 10 Hosted Web App ?

You need to set the WindowsRuntimeAccess property in the Included ApplicationContentUriRules element of the app package manifest file.

<uap:ApplicationContentUriRules>
      <uap:Rule Type="include" WindowsRuntimeAccess="all" Match="http://developerpublish.com/" />
</uap:ApplicationContentUriRules>

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this post, you will learn about sync provider notifications in Windows 11 and how to disable or enable it...
In this tutorial, let’s learn how to enable or disable the startup sound in Windows 11. By default, when Windows...
The CameraCaptureTask allows the Windows Phone 7 App to launch the Camera Application . This will be useful when the...