New web views in MoneyWorks 9.1 and later

WKWebKit on Mac

MoneyWorks 9.1 and later on Mac uses WKWebView instead Webview for embedded web controls. This change should be entirely transparent to existing scripts that use webviews. You get the newer out-of-process javascript engine.

WebView2 on Windows

MoneyWorks 9.1 and later on Windows will use WebView2 for scripted web views instead of IWebBrowser2 if the WebView2 Runtime is installed. WebView2 provides the Chromium-based Edge browser instead of IE11.

If Webview2 is not installed (you can check in Add/Remove Programs — it appears as "Microsoft Edge Webview2 Runtime" — you can get the installer from Microsoft. Use the Evergreen Bootstrapper. It's installed by default in Windows 11, and is highly likely to be installed automatically if you have Office 365 on the machine.

It is worth noting that WebView2 on Windows instantiates asynchronously. If you load a URL, HTML, or javascript immediately when your webview-containing window opens, MoneyWorks will store the request until such time as the Webview2 is instantiated. Do not expect to be able to do multiple loads at instantiation.

Configuring

How to get the old IE11 web view

If for some reason you want the old IE11-based web view on Windows, you can force it to be used by using the following before the window containing the web view is instantiated (note that this usage of WebViewControl will throw an error on earlier versions of MoneyWorks)

WebViewControl(NULL, NULL, "options useWebView2IfAvailable='false')
Finding out if the Edge browser is available

On Windows, you can determine if WebView2 is available with the following:

WebViewControl(NULL, NULL, "query available='WebView2'"))

This will return true if WebView2 is available on the machine. This usage requires MoneyWorks 9.1 or later.

Getting the web inspector

To enable access to the browser's inspector functionality, you can use the following option

WebViewControl(wndhdl, "L_WEB", "options wantContextualMenu='true' enableInspector='true'")

Contextual menus on Windows are disabled by default. This will enable the contextual menu and the web inspector item in that menu. wantContextualMenu is ignored on Mac (the contextual menu is always available).

Posted in Uncategorized | Comments Off on New web views in MoneyWorks 9.1 and later