MDN self-hosted library · e01.org

MutationEvent: relatedNode property

UI Events

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

UI Events

The relatedNode read-only property of the MutationEvent interface returns a string indicating the node related to the event, like the changed node inside the subtree for DOMSubtreeModified.

Value

A string.

Examples

element.addEventListener("DOMSubtreeModified", (event) => {
  console.log(event.relatedNode);
});

Specifications

Browser compatibility