- CSS for modal dialog

- User can click outside modal dialog to close it
This commit is contained in:
Greg Burri 2025-05-01 00:48:51 +02:00
parent 3bc17cea79
commit 8be2aa0129
9 changed files with 93 additions and 52 deletions

View file

@ -49,6 +49,23 @@ impl SelectorExt for Element {
}
}
// Not used anymore.
// pub trait NodeHelperExt {
// fn is_parent(&self, child: &Node) -> bool;
// }
// impl NodeHelperExt for Node {
// fn is_parent(&self, child: &Node) -> bool {
// let mut node = child.clone();
// while let Some(parent) = node.parent_node() {
// if &parent == self {
// return true;
// }
// node = parent;
// }
// false
// }
// }
pub fn selector<T>(selectors: &str) -> T
where
T: JsCast,