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: events.rs
    path of file: ./repos/sauron/crates/sauron-core/src/dom
    
    the code of the file until where you have to start completion: //! Create [events][0] Object
//!
//! [0]: https://developer.mozilla.org/en-US/docs/Web/Events
use crate::dom::{document, window, Event};
use crate::{
    html::attributes::AttributeValue,
    vdom::{Attribute, Listener},
};
use wasm_bindgen::JsCast;
#[cfg(web_sys_unstable_apis)
    
fn to_checked(event: Event) -> bool {
    let web_event = event.as_web().expect("must be a web event");
    let target: EventTarget = web_event.target().expect("Unable to get event target");
    if let Some(input) = target.dyn_ref::<HtmlInputElement>() {
        input.checked()
    } else {
        panic!("must be a html input element");
    }
}