節点文書

Node インターフェイス ownerDocument 属性 (DOM)

[4] NodeownerDocument 属性は、 Document では null を、それ以外では節点文書を返します >>2

仕様書

取得器

[15] Node インターフェイスownerDocument IDL属性の型は Document? です >>2

[16] 節点文書なら、 null を返さなければなりません >>2

[17] 節点文書以外なら、節点文書を返さなければなりません >>2

[18] 常に節点文書を返さないのは歴史的理由です。

節点文書

[6] 節点は作成時に節点文書 (node document) が関連付けられます >>5

[7] 節点文書ownerDocument は、 Document においてのみ異なる値になります。

[10] 節点文書を変更する操作は養子化 (adopt) と呼ばれています。詳しくは adopt の項を参照してください。

[14] それ以外で ownerDocument節点文書が変化することはありません。
[19] すべての節点は、節点文書を持ちます。文書節点が同じに属さないとしても、 常に節点文書は存在しています。

歴史

W3C DOM

[1] ownerDocumentnullになるのは、Document節点自体の場合と、createDocumentTypeしてからまだ使用していないDocumentType節点の場合です。

createDocumentTypeEntity節点Notation節点も含まない文書型を作ると定義されているので、それ以外の種類の節点ownerDocumentnullになることはありません。

[8] Document Object Model (DOM) Level 3 XPath Specification ( ( 版)) <http://www.w3.org/TR/2004/NOTE-DOM-Level-3-XPath-20040226/DOM3-XPath.html#xpath-XPathNamespace>

DOM4

[3] DOM Living Standard では createDocumentType はその DOMImplementation オブジェクトと関連付けられている Document オブジェクトDocumentType を作ることになっているため、その ownerDocumentnull ではなく、必ず Document となるようになりました。

[9] Web Applications 1.0 r8270 Share the ownerDocument of template contents amongst the templates of a document. ( ( 版)) <http://html5.org/tools/web-apps-tracker?from=8269&to=8270>

[12] HTML Standard では DOM Standard 以前から 「節点Document」や 「属性Document」 といった用語が使われていましたが、 後に節点文書に統一されました >>11, >>13

[20] not in the same tree: use node document over ownerDocument attribute (andreastt著, ) <https://github.com/w3c/webdriver/commit/897ea11f992db15e55287c132b0b7db01e7a7281>

[21] not in the same tree: use node document over ownerDocument attribute by andreastt · Pull Request #1074 · w3c/webdriver () <https://github.com/w3c/webdriver/pull/1074>

[22] Replace prose about `ownerDocument` tree with DOM4 concept of `connec… (patrickhlauke著, ) <https://github.com/w3c/pointerevents/commit/8f71ae0bab7afb9cb5785b8650228b7b06dd5452>

[23] Replace prose about `ownerDocument` tree with DOM4 concept of `connected` by patrickhlauke · Pull Request #246 · w3c/pointerevents () <https://github.com/w3c/pointerevents/pull/246>

[24] Should setPointerCapture work in Shadow DOM · Issue #221 · w3c/pointerevents () <https://github.com/w3c/pointerevents/issues/221>