The MASM Forum

Projects => Rarely Used Projects => GoAsm => Topic started by: jorgon on May 23, 2024, 03:01:02 PM

Title: Implementation of WebView2
Post by: jorgon on May 23, 2024, 03:01:02 PM
Hi All

WebView2 allows you to embed a modern (Chromium/Edge) browser in an ordinary Window.
The SDK is mostly .net, but there are some C++ examples.
However, how it works is exceptionally obscure - until now!
Here is an implementation of WebView2 in one file using GoAsm (no includes - hurrah!).

The code relies on one Windows redistributable DLL - WebView2Loader.dll (in this case the 32 bit version).  The call to that DLL kicks everything off as can be seen from the code.

Cheers

Jeremy
Title: Re: Implementation of WebView2
Post by: jj2007 on May 23, 2024, 03:10:01 PM
The exe works fine, compliments :thumbsup:

Timo had something similar some time ago (https://masm32.com/board/index.php?msg=125415).
Title: Re: Implementation of WebView2
Post by: jorgon on June 11, 2024, 12:46:44 AM
CommWebView2 builds on HelloWebView2.asm to show how it is possible to establish two way communication with the WebView2 browser, and use it as a rich text (html) editor.  It explains the use of Navigate, NavigateToString, ExecuteScript, execCommand, and add_WebMessageReceived.