HTML API

setAttribute

Sets the value of an attribute on the specified element. If the attribute already exists, the value is updated; otherwise a new attribute is added with the specified name and value.
Throws an exception when the application cannot find a match for the element or the attribute key is different. See HTML live edit for further information.

tilepieces.core.htmlMatch.setAttribute(element,name,value);

Parameters

element
DOM element
name
DOMString specifying the name of the attribute whose value is to be set. The attribute name is automatically converted to all lower-case when setAttribute() is called on an HTML element in an HTML document.
value
DOMString containing the value to assign to the attribute. Any non-string value specified is converted automatically into a string.

Return Value

None.