このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。

View in English Always switch to English

MutationEvent: relatedNode プロパティ

Deprecated
To be removed

This feature is pending removal from browsers. Using it now may lead to broken functionality in future updates. Mutation events negatively impact performance and they were selected for removal from the web as part of Interop 2025.

Use the following features instead: MutationObserver.

relatedNodeMutationEvent インターフェイスの読み取り専用プロパティで、 DOMSubtreeModified のサブツリー内の変更されたノードのように、イベントに関連するノードを示す文字列を返します。

文字列です。

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

仕様書

この機能は、どの仕様書にも定義されていません。

ブラウザーの互換性