Firefox Tomorrow

web api instance property

MutationEvent: prevValue property

View on MDN ↗

The prevValue read-only property of the MutationEvent interface returns a string. In DOMAttrModified events, it represents the previous value of the Attr node. In DOMCharacterDataModified events, it contains the previous value of the CharacterData node. In all other cases, returns the empty string ("").

Value

A string.

Examples

element.addEventListener("DOMAttrModified", (event) => {
  console.log(event.previousValue);
});

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.