This type represents 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.
This type represents 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