Back to Content

MutationEvent: relatedNode property

files/en-us/web/api/mutationevent/relatednode/index.md

latest501 B
Original Source

{{APIRef("UI Events")}}{{Deprecated_Header}}{{non-standard_header}}

The relatedNode read-only property of the {{domxref("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

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

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}