attr top-level property

dynamic get attr

A DOM element's attribute as an object. In most DOM methods, you will probably directly retrieve the attribute as a string (e.g., Element.getAttribute(), but certain functions (e.g., Element.getAttributeNode()) or means of iterating give Attr types.

MDN Reference

Implementation

_i2.dynamic get attr => _i4.getProperty(
      _self,
      'Attr',
    );