Skip to main content

muskitty_dom/
lib.rs

1//! MusKitty DOM
2//!
3//! 实现 DOM Living Standard 的核心节点类型与树操作 API。
4//!
5//! # 模块结构
6//!
7//! - [`node`]:`Node`、`NodeType`、`NodeKind`、`Descendants`
8//! - [`element`] / [`text`] / [`comment`] / [`document`] / [`document_type`] /
9//!   [`document_fragment`]:各节点类型的数据载体
10//! - [`attribute`]:`Attribute`、`Namespace`
11//! - [`tree`]:树修改算法(`append_child` / `insert_before` / `remove_child` / `replace_child`)
12//! - [`event`]:事件模型(`Event`、`add_event_listener` / `dispatch_event`)
13//! - [`error`]:`DomError`
14//!
15//! # 参考
16//!
17//! - DOM Living Standard: <https://dom.spec.whatwg.org/>
18
19pub mod attribute;
20pub mod comment;
21pub mod document;
22pub mod document_fragment;
23pub mod document_type;
24pub mod element;
25pub mod error;
26pub mod event;
27pub mod node;
28pub mod processing_instruction;
29pub mod text;
30pub mod tree;
31
32pub use attribute::{Attribute, Namespace};
33pub use comment::CommentData;
34pub use document::DocumentData;
35pub use document_fragment::DocumentFragmentData;
36pub use document_type::DocumentTypeData;
37pub use element::ElementData;
38pub use error::DomError;
39pub use event::{
40    add_event_listener, dispatch_event, remove_event_listener, Event, EventCallback,
41    EventListenerOptions, EventPhase,
42};
43pub use node::{Descendants, Node, NodeKind, NodeType};
44pub use processing_instruction::ProcessingInstructionData;
45pub use text::TextData;
46pub use tree::{
47    adopt_node, append_child, clone_node, drain_children, insert_before, normalize, push_child_raw,
48    remove_child, replace_child, retain_children, set_text_content,
49};