Associates a service attribute with the specified name and value to the specified element. (See also below: What are Service Attributes?)
If the element already has a service attribute with that name, its value is replaced with the new one.
Parameters:
element
setServiceAttr(contextElement, attrName)
attrName
value
null
.
null
,
if no service attribute with the specified name has been attached to the specified element.
Note: null
can be also a legitimate value of a service attribute.
To distinguish if the attribute had a null
value or did not exist,
use hasServiceAttr()
function.
getServiceAttr(), hasServiceAttr(), removeServiceAttr()
${include ../../../refs/service_attrs.htm}