add_attribute
add_attribute($name_attr,$value_attr); - add an attribute to an element in the DOM model
The function accepts parameters as input:
$name_attr – name of the attribute to be added (string). If the attribute name matches an existing attribute for an element, the value of this attribute will simply be changed.$value_attr – the attribute value that will be set to the added attribute (string).
After the function returns the result of their work in the script (the return value type is boolean):
true – executed successfullyfalse to find this element failed (e.g. no items that meet the specified criteria or not this frame)