[][src]Function sauron::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) + 'static>)>, RandomState>,
    node_idx_lookup: &mut HashMap<usize, Node, RandomState>,
    focused_node: &mut Option<Node>,
    patches: Vec<Patch<'_, &'static str, &'static str, &'static str, AttributeValue, Event, MSG>>
) -> Result<HashMap<u32, Vec<(&'static str, Closure<dyn FnMut(Event) + 'static>)>, RandomState>, JsValue> where
    DSP: Clone + Dispatch<MSG> + 'static,
    MSG: 'static,
    N: Into<Node>, 

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