#[derive(Debug)]
pub enum BrowsingContext {
Empty,
Blank,
Self_,
Parent,
Top,
}
impl std::fmt::Display for BrowsingContext {
fn fmt(
&self,
f: &mut std::fmt::Formatter<'_>,
) -> Result<(), std::fmt::Error> {
let s = match self {
Self::Empty => String::from(""),
Self::Self_ => String::from("Self"),
_ => format!("{:?}", self),
};
write!(f, "_{}", s.to_lowercase())
}
}