Struct sauron::dom::CreatedNode [−][src]
pub struct CreatedNode {
pub node: Node,
// some fields omitted
}
Expand description
A node along with all of the closures that were created for that node’s events and all of it’s child node’s events.
Fields
node: Node
A Node
or Element
that was created from a Node
Implementations
create a simple node with no closure attache
create a text node
pub fn create_dom_node<DSP, MSG>(
program: &DSP,
vnode: &Node<&'static str, &'static str, &'static str, AttributeValue<MSG>>,
focused_node: &mut Option<Node>
) -> CreatedNode where
MSG: 'static,
DSP: Clone + Dispatch<MSG> + 'static,
pub fn create_dom_node<DSP, MSG>(
program: &DSP,
vnode: &Node<&'static str, &'static str, &'static str, AttributeValue<MSG>>,
focused_node: &mut Option<Node>
) -> CreatedNode where
MSG: 'static,
DSP: Clone + Dispatch<MSG> + 'static,
Create and return a CreatedNode
instance (containing a DOM Node
together with potentially related closures) for this virtual node.
pub fn set_element_attributes<DSP, MSG>(
program: &DSP,
closures: &mut HashMap<usize, Vec<(&'static str, Closure<dyn FnMut(Event) + 'static>), Global>, RandomState>,
element: &Element,
attrs: &[&Attribute<&'static str, &'static str, AttributeValue<MSG>>]
) where
MSG: 'static,
DSP: Clone + Dispatch<MSG> + 'static,
pub fn set_element_attributes<DSP, MSG>(
program: &DSP,
closures: &mut HashMap<usize, Vec<(&'static str, Closure<dyn FnMut(Event) + 'static>), Global>, RandomState>,
element: &Element,
attrs: &[&Attribute<&'static str, &'static str, AttributeValue<MSG>>]
) where
MSG: 'static,
DSP: Clone + Dispatch<MSG> + 'static,
set the element attribute
pub fn set_element_attribute<DSP, MSG>(
program: &DSP,
closures: &mut HashMap<usize, Vec<(&'static str, Closure<dyn FnMut(Event) + 'static>), Global>, RandomState>,
element: &Element,
attr: &Attribute<&'static str, &'static str, AttributeValue<MSG>>
) where
MSG: 'static,
DSP: Clone + Dispatch<MSG> + 'static,
pub fn set_element_attribute<DSP, MSG>(
program: &DSP,
closures: &mut HashMap<usize, Vec<(&'static str, Closure<dyn FnMut(Event) + 'static>), Global>, RandomState>,
element: &Element,
attr: &Attribute<&'static str, &'static str, AttributeValue<MSG>>
) where
MSG: 'static,
DSP: Clone + Dispatch<MSG> + 'static,
set the element attribute
pub fn remove_element_attribute<MSG>(
element: &Element,
attr: &Attribute<&'static str, &'static str, AttributeValue<MSG>>
) -> Result<(), JsValue>
pub fn remove_element_attribute<MSG>(
element: &Element,
attr: &Attribute<&'static str, &'static str, AttributeValue<MSG>>
) -> Result<(), JsValue>
remove element attribute, takes care of special case such as checked