Contents - Index - Top


RequestCurrentTextSync

Interface AntViewDocument

 

Type: Method

Parameters: String Text

Returns: Integer

 

 

Requests the control to retrieves the text representation of the top level document currently rendered.

 

Note that this might not include frames. 

In particular, if you have a frame that is in a different domain then by default security rules will prevent your javascript to access (or read) any of the html elements in that frame.

For access to frames, use OnFrameCreated and the AntViewFrame interface.

 

The function returns:

 0 if no errors. 

 21 function is already running (can only run one at a time)

 22 function timed out

 25 Trying to run a synchronous method from within a WebView2 event

 

 

The Synchronous alternative of the RequestCurrentText method.

As the function wraps the async bits, you cannot have the asynchronous variant running when you call this.

Beware that you cannot use a synchronous call from within an AntView event.

 

Example: 

Fill Form Sync Example

 

Introduced in AntView release 1.1.236

 


AntView - The MS Edge WebView2 ActiveX control Date last changed: 09/30/2024