work on integrating new pass system

This commit is contained in:
Evan Almloff committed 2022-12-31 22:34:16 -06:00
1 parent e76cd63ee3
commit 9e971fbe11
9 files changed
+1251 -1158

No files matched your search

+11 -10
View File
@@ -21,23 +21,24 @@ pub struct NodeData {
pub node_type: NodeType,
}
#[derive(Debug, Clone)]
pub struct ElementNode {
pub tag: String,
pub namespace: Option<String>,
pub attributes: FxHashMap<OwnedAttributeDiscription, OwnedAttributeValue>,
pub listeners: FxHashSet<String>,
}
/// A type of node with data specific to the node type. The types are a subset of the [VNode] types.
#[derive(Debug, Clone)]
pub enum NodeType {
Text {
text: String,
},
Element {
tag: String,
namespace: Option<String>,
attributes: FxHashMap<OwnedAttributeDiscription, OwnedAttributeValue>,
listeners: FxHashSet<String>,
},
Text(String),
Element(ElementNode),
Placeholder,
}
impl<S: State> Node<S> {
pub(crate) fn new(node_type: NodeType) -> Self {
pub fn new(node_type: NodeType) -> Self {
Node {
state: S::default(),
node_data: NodeData {