節並び

節並び

仕様書

利用箇所

[16] NodeList の利用箇所
[25] 「※」以外は live です。
[17] NodeList継承したインターフェイス

関連

[18] HTMLCollection, NamedNodeMap などと似ていますが、 継承関係にはありません。

歴史

[19] 元々の DOM0 に基づく集成HTMLCollection の方で、 NodeList は後から DOM1 で追加されたものです。

[1] NodeList 界面は、 Node順序付き集まりを扱います。 この集まりをどう実装するかは定義・制約されていません。

[2]

methoditem項目を取得[DOM1]
読取専用属性length個数[DOM1]

[3] どう実装するかは定義しないとしながらも、 >>2 の界面定義はかなりの制約です。 多くのプログラム言語配列の仕組みを持っていますが、 この定義では必ずしもそれを利用出来ません。 (DOM の最初の実装である JavaScript の流儀に強く影響されています。)

例えば perl の束縛なら、 $i 番目の項目 (節) は $$node_list [$i] で、個数は scalar @$node_list で取得したいところです。 (perl の場合は、適当な class に bless しておけば DOM 式と perl 式を同時に実装できますね。)

[4] なお、項目番号 (index) は 0 から始まります。 これも束縛先言語との流儀の絡みであまり嬉しい制約ではありません。 (しかしながら、最初の索引番号を何にす(な)るか考えなくて良いと言う意味では嬉しい制約です。)

[11] Bug 14547 - typeof document.body.childNodes=="function" ("object" expected) (2008-03-22 22:09:03 +09:00 版) <http://bugs.webkit.org/show_bug.cgi?id=14547>

[12] IRC logs: freenode / #whatwg / 20100121 ( 版) <http://krijnhoetmer.nl/irc-logs/whatwg/20100121#l-360>

[13] HTML5 Revision Tracker ( 版) <http://html5.org/tools/web-apps-tracker?from=4701&to=4702>

[14] HTML5 Revision Tracker ( 版) <http://html5.org/tools/web-apps-tracker?from=4701&to=4702>

[20] Document Object Model for MathML ( ( 版)) <http://www.w3.org/TR/2001/REC-MathML2-20010221/appendixd.html#dom_NodeList>

[21] Document Object Model for MathML ( ( 版)) <http://www.w3.org/Math/DOM/mathml2/appendixd.html#dom_NodeList>

[22] IRC logs: freenode / #whatwg / 20130603 ( ( 版)) <http://krijnhoetmer.nl/irc-logs/whatwg/20130603#l-769>

[23] Add a warning note about ArrayClass. · 3c2a039 · whatwg/dom ( 版) <https://github.com/whatwg/dom/commit/3c2a03960ba59e87b5d43cfeb997860b7aef8b98>

[24] [whatwg] Proposal: Adding methods like getElementById and getElementsByTagName to DocumentFragments ( ( 版)) <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-July/040244.html>

[26] Fix #208: remove the Microdata API · whatwg/html@2aaecb8 ( 版) <https://github.com/whatwg/html/commit/2aaecb89900b875b9ee8357fa8bccf48477358bb>