MutationEvent: attrName property
UI Events
UI Events
The attrName read-only property of the MutationEvent interface returns a string with the name of the node affected by the DOMAttrModified event. It has no meaning for other events and is then set to the empty string ("").
Value
A string.
Examples
element.addEventListener("DOMAttrModified", (event) => {
console.log(event.attrName);
});