SetElementOuterHTMLByName
Interface AntViewDocument
Type: Method
Parameters: String Name String Html
Returns: nothing
Sets the outerHTML for the html element identified by Name in the document currently loaded in the WebView2 component.
Note that the Name is case sensitive and must match the case of the html element.
This triggers the OnSetElementOuterHTMLByName event on completion as it is an asynchronous operation.
Note that multiple elements can match the name passed. If this is the case then only the first element that matches the name will be set.
There's also a synchronous alternative SetElementOuterHTMLByNameSync that wraps the property and event into one call. This gives you the possibility to immediately check the result after executing the method.
See also: RequestElementOuterHTMLByName
Example:
Introduced in AntView release 2.0.514
AntView - The MS Edge WebView2 ActiveX control Date last changed: 04/16/2025