Contents - Index


AntViewDocument

 

The document interface is an additional interface to help you to communicate with the document presented in the WebView2 control.

All communication is done via javascript and the functions presented below have been implemented as additional helper functions.

 

Note that communication in javascript with the webview2 component is all done in an asynchronous way.

This means that when you want data in return from the control you first have to request in method a) for the data and then wait for event b) to be raised to get the data you asked for.

 

This brings a few challenges so being able to determine what method an event belongs with is one of the key areas.

Another part where the document interface can help is by processing common tasks such as processing data in forms.

Eg. 

- get/set data from forms

- pressing the submit button

 

One part that is in common with almost all the methods below is that you have to connect the document interface with the WebView2 control before you can use it. You do this with the CurrentBrowser method.

 

 

Properties

AnonymousFunctionReturnParams

CurrentBrowser

ElementValueById

ElementValueByName

 

Methods

DecodeJsonObjectString

RequestCurrentHtml

RequestElementValueById

RequestElementValueByName

RequestFormSubmitById

RequestFormSubmitByName

RunAnonymousFunction

 

Events

OnRequestCurrentHtml

OnRequestElementValueById

OnRequestElementValueByName

OnRequestFormSubmitById

OnRequestFormSubmitByName

OnRunAnonymousFunction

OnSetElementValueById

OnSetElementValueByName