Zoom content to fit in a UWP WebView
I am trying to implement a zoom to content fit function in a XAML-WebView control inside a UWP app. As the semi-official solution for zooming seems to be using JavaScript, my approach was to dynamically set the zoom CSS-property of the body element. Now the question is to find the right zoom factor. According to the documentation, the WebView uses the Edge browser in document mode. However, in Edge, I found that the document.body.clientWidth -property always returns the document width, regardless of the window size and even the zoom factor. Thus, I set the zoom factor using document.body.style