WebVR in WebView

As of the Windows 10 April 2018 Update (version 1803, build 17134, EdgeHTML 17), WebVR is supported in WebView controls in Windows 10 apps. The WebView control enables you to host web content in your Windows 10 app. See Microsoft Edge WebView for Windows 10 apps for more information about WebView.

Add WebVR support to a WebView control

In order for your WebView control to host WebVR content, there are a few steps you'll have to take.

  1. Initialize the WebView programmatically to run in a separate process. You'll have to declare, initialize, and add it to the UI programmatically (rather than declaratively in the XAML or HTML).

  2. Add a PermissionRequested event handler for the WebView. In it, allow the permission request.

The following sample declares and initializes a WebView, handles the PermissionRequested event, adds the WebView to the UI, and navigates to a WebVR site.

WebView webView;

public MainPage()
    webView = new WebView(WebViewExecutionMode.SeparateProcess);
    webView.PermissionRequested += MyWebView_PermissionRequested;
    Grid.SetRow(webView, 1);

private void MyWebView_PermissionRequested(
    WebView sender, WebViewPermissionRequestedEventArgs args)
let wvprocess = new MSWebViewProcess();

// WebViews created with the same MSWebViewProcess object share the same process
wvprocess.CreateWebViewAsync().then(function (webview) {
    webview.addEventListener("MSWebViewPermissionRequested", e => {

See also