use web_sys::{Document, Element, Window};
pub fn window() -> Window {
web_sys::window().unwrap()
}
pub fn document() -> Document {
web_sys::window().unwrap().document().unwrap()
}
pub fn body() -> std::result::Result<Element, String> {
let b = document()
.query_selector("body")
.unwrap()
.ok_or_else(|| "Unable to get body element".to_string())?;
Ok(b)
}