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’ll learn about the Win32 Error “0x000019E5 – ERROR_COULD_NOT_RESIZE_LOG” that you get when debugging system erors in...
In this post, you’ll learn about the error “CO_E_DBERROR 0x8004E02B” that is returned when working with COM based APIs or...
In this post, you’ll learn about the Win32 Error “0x000019D0 – ERROR_LOG_BLOCK_VERSION” that you get when debugging system erors in...