fn new_obj(name: &str) -> Self {
        let val_opt = web_sys::window().unwrap().get(name);
        let js_obj = match val_opt {
            Some(js_obj) => js_obj,
            None => return Self::None,
        };
        // The object should only actually contain the string value that was injected
        let val_str = match js_obj.as_string() {
            Some(val_str) => val_str,
            None => return Self::Malformed,
        };
        let val_typed = match serde_json::from_str::<T>(&val_str) {
            Ok(typed) => typed,
            Err(_) => return Self::Malformed,
        };

        Self::Some(val_typed)
    }
Gets the window variable of the given name, attempting to fetch it as
the given type. This will only work with window variables that have
been serialized to strings from the given type `T`.
packages/perseus/src/reactor/mod.rs