Contents - Index - Top


SetElementAttributeByNameSync

Interface AntViewDocument

 

Type: Method

Parameters: String Name String AttrName String Value

Returns: Integer

 

 

Set the value of the attribute for the html element in the document currently loaded in the WebView2 component.

The html element is identified by parameter Name.

The attribute is passed via parameter AttrName.

 

The function returns:

  0 when the element is found and the value of the attribute was set, 

  1 if no element identified by Name was found.

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

  22 function timed out

  23 document not connected to WebView2 control

  24 Name parameter was empty

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

 

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.

 

The Synchronous alternative of the SetElementAttibuteByName 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.

 

Introduced in AntView release 1.1.330

 


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