For years the ActiveX WebBrowser control which is based on Internet Explorer (trident) has been used by a lot of applications as an embedded control.
By using that the embedded browser control, it was possible to extend your application functionality. Sadly Microsoft has declared the trident based control as legacy and is no longer continuing development for it.

Another control has come in its place, based on Chromium. It is called MS Edge WebView2.
Microsoft provides bindings for a variety of languages and even added a com interface, but not all programming languages can directly consume that interface.
Microsoft declares that interface as being solely for C++ and refers to it as the Win32 interface whereas the other programming languages it is designed for are .net variants.

This is why Antwise Solutions developed an ActiveX wrapper for the WebView2 control so that it is easy to use from any language that is able to use ActiveX controls.

After a few months of public tests we now officially offer our control and have dubbed it “AntView”.

With the old Microsoft WebBrowser control you could access and manipulate the html document DOM interface via an automation interface commonly referred to as mshtml. This was very powerful.
The WebView2 control does not offer a direct way to interact with the DOM interface, however it does offer a javascript bridge through which you can do most of what you formerly could do via mshtml.

We do expose the javascript interface via ExecuteScript, but as it is an asynchronous interface and everything it returns is done via JSON, it sometimes is a bit confusing to use. In order to simplify interacting with the html document hosted in your control, we added the AntViewDocument automation class that lets you do some of the more standard things:

  1. Request the html of the page currently rendered.
  2. Read the value of any html element by name or id.
  3. Write the value of any html element by name or id.
  4. Submit a form by id
  5. Execute an anonymous function where you can pass your parameters from native code
  6. Decode a JSON object string

We expect that this will be extended upon over time, so that the amount of embedded javascript you will need to write can be kept to a minimum.