Element.hasAttribute

bool hasAttribute(string name) @scriptable

Returns if the attribute exists.