You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: dom_node.rs
    path of file: ./repos/sauron/crates/sauron-core/src/dom
    
    the code of the file until where you have to start completion: use crate::{
    dom::events::MountEvent,
    dom::{self, Application, Program},
    dom::{document, window},
    html,
    html::attributes::{AttributeValue, Listener, SegregatedAttributes},
    vdom,
    vdom::{Attribute, Leaf, NodeTrait},
};
use js_sys::Function;
use mt_dom::TreePath;
use std::collections::HashMap;
use std::{cell::Cell, collections::BTreeMap};
use wasm_bindgen::{closure::Closure, JsCast, JsValue};
use web_sys::{
    self, Element, HtmlButtonElement, HtmlDataElement, HtmlDetailsElement, HtmlFieldSetElement,
    HtmlInputElement, HtmlLiElement, HtmlLink
    
    pub(crate) fn remove_event_listeners(&self, node: &Element) -> Result<(), JsValue> {
        let all_descendant_vdom_id = get_node_descendant_data_vdom_id(node);
        let mut node_closures = self.node_closures.borrow_mut();
        for vdom_id in all_descendant_vdom_id {
            if let Some(old_closure) = node_closures.get(&vdom_id) {
                for (event, oc) in old_closure.iter() {
                    let func: &Function = oc.as_ref().unchecked_ref();
                    node.remove_event_listener_with_callback(intern(event), func)?;
                }
                // remove closure active_closure in dom_updater to free up memory
                node_closures
                    .remove(&vdom_id)
                    .expect("Unable to remove old closure");
            } else {
                log::warn!("There is no closure marked with that vdom_id: {}", vdom_id);
            }
        }
        Ok(())
    }