mirror of
https://github.com/lune-org/lune.git
synced 2025-05-04 10:43:57 +01:00
Add Instance::clone_multiple_into_external_dom
This commit is contained in:
parent
ef838815d2
commit
24fff3ffa0
1 changed files with 15 additions and 0 deletions
|
@ -144,6 +144,21 @@ impl Instance {
|
||||||
cloned
|
cloned
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn clone_multiple_into_external_dom(
|
||||||
|
referents: &[DomRef],
|
||||||
|
external_dom: &mut WeakDom,
|
||||||
|
) -> Vec<DomRef> {
|
||||||
|
let dom = INTERNAL_DOM.lock().expect("Failed to lock document");
|
||||||
|
|
||||||
|
let cloned = dom.clone_multiple_into_external(referents, external_dom);
|
||||||
|
|
||||||
|
for referent in cloned.iter() {
|
||||||
|
external_dom.transfer_within(*referent, external_dom.root_ref());
|
||||||
|
}
|
||||||
|
|
||||||
|
cloned
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Clones the instance and all of its descendants, and orphans it.
|
Clones the instance and all of its descendants, and orphans it.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue