[][src]Function sauron_core::dom::apply_patches::patch

pub fn patch<N, DSP, MSG>(
    program: Option<&DSP>,
    root_node: N,
    old_closures: &mut HashMap<u32, Vec<(&'static str, Closure<dyn FnMut(Event)>)>>,
    node_idx_lookup: &mut HashMap<NodeIdx, Node>,
    focused_node: &mut Option<Node>,
    patches: Vec<Patch<'_, MSG>>
) -> Result<HashMap<u32, Vec<(&'static str, Closure<dyn FnMut(Event)>)>>, JsValue> where
    N: Into<Node>,
    MSG: 'static,
    DSP: Clone + Dispatch<MSG> + 'static, 

Apply all of the patches to our old root node in order to create the new root node that we desire. This is usually used after diffing two virtual nodes.

Note: If Program is None, it is a dumb patch, meaning there is no event listener attached or changed