MutationEvent: relatedNode property
UI Events
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);
});