[1] [DFN[[RUBYB[木順]@en[tree order]]]]は、 [[DOM]] における[[節点]] ([CODE(DOMi)@en[[[Node]]]]
[[オブジェクト]]) に関する[[順序関係]]です。[[親]]が[[子]]よりも先、[[兄]]が[[弟]]よりも先になります。

* 仕様書

[REFS[
- [10] [CITE@en[DOM Standard]] ([TIME[2016-02-28 19:25:10 +09:00]] 版) <https://dom.spec.whatwg.org/#concept-tree-order>
]REFS]

* 定義

[4] 
>
The term [DFN[tree order]] means a pre-order, depth-first traversal of DOM nodes involved 
(through the [CODE(DOMa)@en[[[parentNode]]]]/[CODE(DOMa)@en[[[childNodes]]]] relationship).

用語「[DFN[木順]]」は、関係する [[DOM]] [[節点]]の ([CODE(DOMa)@en[[[parentNode]]]]/[CODE(DOMa)@en[[[childNodes]]]] 
[[関係]]を通じた) [RUBYB[[[行きがけ順]]]@en[pre-order]]の[[深さ優先探索]]を意味します。
[SRC[>>2, >>3]]

* 関連

[5] 次の[[順序]]は、[[木順]]を含み、[[木順]]で扱えない[[オブジェクト]]についても定義しているものです。
[FIG(list short)[
- [[文書順]]
- [[影根を含む木順]]
- [[フォーカス可能領域の順序]]
]FIG]

* 歴史

[11] はじめ、 [[HTML5]] で定義されていました。後に [[Web DOM Core]]
でも同内容で定義されました。

[12] 2016年2月には、 [[HTML Standard]] の定義が削除され、
[[DOM Standard]] に統一されました。

[REFS[
- [2] [CITE@en[[[Web Applications 1.0]]]] <http://www.whatwg.org/specs/web-apps/current-work/complete.html#tree-order>
- [3] [CITE@en-US[[[Web DOM Core]]]] <http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#tree-order>
- [9] [CITE@en[Reference the DOM Standard for the tree order concept · whatwg/html@130af62]]
([TIME[2016-02-29 18:15:09 +09:00]] 版)
<https://github.com/whatwg/html/commit/130af62724bff8b627587e2eafd8496d4c69cf69>
]REFS]