SetElementOuterHTMLById
Interface AntViewDocument
Type: Method
Parameters: String Id String Html
Returns: nothing
Set the outerHTML for the html element identified by Id in the document currently loaded in the WebView2 component.
Note that the id is case sensitive and must match the case of the html element.
This triggers the OnSetElementOuterHTMLById event on completion as it is an asynchronous operation.
There's also a synchronous alternative SetElementOuterHTMLByIdSync that wraps the method and event into one call and gives you the ability to check the result immediately after executing the method.
See also: RequestElementOuterHTMLById
Introduced in AntView release 2.0.514
AntView - The MS Edge WebView2 ActiveX control Date last changed: 04/16/2025