hasAttributeValue method

bool hasAttributeValue(
  1. String name, [
  2. DOMContext? domContext
])

Returns true if attribute for name exists.

domContext Optional context used by DOMGenerator.

Implementation

bool hasAttributeValue(String name, [DOMContext? domContext]) {
  var attr = getAttribute(name);
  if (attr == null) return false;
  var value = attr.getValue(domContext);
  return value != null && value.isNotEmpty;
}