pub(crate) fn new_bool(name: &str) -> Self {
        let val_opt = web_sys::window().unwrap().get(name);
        let js_bool = match val_opt {
            Some(js_bool) => js_bool,
            None => return Self::None,
        };
        // The object should only actually contain the boolean value that was injected
        match js_bool.as_bool() {
            Some(val) => Self::Some(val),
            None => Self::Malformed,
        }
    }
Gets the window variable of the given name, attempting to fetch it as
the given type. This will only work with boolean window variables.

While it may seem that a boolean cannot be 'malformed', it most
certainly can be if you think it is boolean, but it actually isn't!

This is generally used internally for managing flags.
packages/perseus/src/reactor/mod.rs