hasAttribute method

bool hasAttribute(
  1. String name
)

Checks if this node has the specified attribute.

Implementation

bool hasAttribute(String name) =>
    attributes.containsKey(name.startsWith('@') ? name : '@' + name);