Contents - Index - Top


RequestCurrentText

Interface AntViewDocument

 

Type: Method

Parameters: none

Returns: nothing

 

 

Requests the control to retrieve the text 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.

 

After the content is retrieved it will return the result in the OnRequestCurrentText event.

 

There's also a synchronous alternative RequestCurrentTextSync that wraps the above into one call and immediately returns the text.

 

Please note that you always need to connect the document object to the WebView2 control with the CurrentBrowser method  before you use this method.

 

Example: 

Fill Form Example

 

Introduced in AntView release 1.1.236

 


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