Shopping list (WIP)
This commit is contained in:
parent
ce3821b94e
commit
084be9fb00
16 changed files with 296 additions and 90 deletions
|
|
@ -13,6 +13,8 @@ pub trait SelectorExt {
|
|||
fn selector_all<T>(&self, selectors: &str) -> Vec<T>
|
||||
where
|
||||
T: JsCast;
|
||||
|
||||
fn deep_clone(&self) -> Self;
|
||||
}
|
||||
|
||||
impl SelectorExt for Element {
|
||||
|
|
@ -38,6 +40,13 @@ impl SelectorExt for Element {
|
|||
.map(|e| e.unwrap().dyn_into::<T>().unwrap())
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn deep_clone(&self) -> Self {
|
||||
self.clone_node_with_deep(true)
|
||||
.unwrap()
|
||||
.dyn_into::<Element>()
|
||||
.unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn selector<T>(selectors: &str) -> T
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue