Subscribe to our YouTube Channel for more Videos

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>

Senthil Kumar B
Senthil Kumar is a former Microsoft MVP (Most Valuable Professional). He is a Co-Author of the book "Windows 10 Development Recipes using JavaScript and CSS" for Apress Publication. He is a technical presenter, blogger, mentor and a Geek.  Senthil is a regular speaker is various local user groups. He has presented at conferences like Great Indian Developer Summit (GIDS) & Microsoft DevCamps. You can reach out to him via his Twitter handle @isenthil.