hasAttribute method

bool hasAttribute(
  1. String name, {
  2. String? namespaceUri,
})

Whether this element has an attribute with the given name and optional namespaceUri.

Implementation

bool hasAttribute(String name, {String? namespaceUri}) =>
    getAttributeNode(name, namespaceUri: namespaceUri) != null;