- CSS for modal dialog
- User can click outside modal dialog to close it
This commit is contained in:
parent
3bc17cea79
commit
8be2aa0129
9 changed files with 93 additions and 52 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue