MDN self-hosted library · e01.org

MutationEvent: attrName property

UI Events

Open notebook · 1 cells web-api-instance-property upstream source

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);
});

Specifications

Browser compatibility