Checks if the element has an attribute with the given name.
This function returns the same result as the following expression:
getAttr(attrName) != null
GOMAttribute
object will be allocated.
Parameters:
element
hasAttr(contextElement, attrName)
attrName
true
if the element contains an attribute with the
specified name;false
otherwise (or in the case element == null
)
getAttr(), setAttr(), hasAttrValue(), GOMAttribute
You may call this function in a more method-like style, e.g.:
element.hasAttr(attrName)