Skip to main content

Module dom_tree

Module dom_tree 

Source

Enums§

Kind 🔒
ノードの種類(DOM Standard の Node の派生)。
Par 🔒
親になる側(主文書の document は HostRef で、アリーナのノードではない)。

Functions§

check_document_children 🔒
親の(Document としての)子の制約の検査(pre-insert と replace で共通。replacing は置き換え対象の子)。
children_of 🔒
convert_nodes 🔒
「nodes を 1 つのノードにする」(ParentNode/ChildNode の変種メソッド)。ノードでない値は文字列にして Text にする。 2 つ以上なら DocumentFragment にまとめる(所有文書は owner)。None は空。
dom_after
this.after(...nodes)。
dom_append
this.append(...nodes)。
dom_append_child
this.appendChild(node)。
dom_before
this.before(...nodes)。
dom_insert_before
this.insertBefore(node, child)。child が null/undefined なら末尾。
dom_prepend
this.prepend(...nodes)。
dom_remove_child
this.removeChild(child)。
dom_replace_child
this.replaceChild(node, child)。置き換えられた child を返す。
dom_replace_children
this.replaceChildren(...nodes)。
dom_replace_with
this.replaceWith(...nodes)。
hierarchy 🔒
is_host_including_inclusive_ancestor 🔒
node が parent の「ホストを含む包含的な祖先」か。
kind_of 🔒
node_arg 🔒
引数がノードか。ノードなら Ok(Some(idx))(主文書の document は Ok(None) で種類は Document)。
owner_doc_of_node 🔒
par_kind 🔒
par_of 🔒
this が親として扱える対象か(DOM ノード、または主文書)。
validate_insert 🔒
DOM Standard の「ensure pre-insertion validity」(replacing は §4.2.4 の replace の検査)。
validate_insert_inner 🔒
viable_sibling 🔒
兄弟(self_idx の親の子)のうち、a に含まれない最初のもの(forward なら後ろ向き、でなければ前向き)。