mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Implement FromIterator<Root<A>> for RootedVec<JS<A>> (fixes #5117)
This commit is contained in:
parent
3062e0c7b1
commit
5cc36f0b91
2 changed files with 14 additions and 3 deletions
|
@ -1629,8 +1629,7 @@ impl Node {
|
|||
Node::adopt(node, &*parent.owner_doc());
|
||||
}
|
||||
// Step 2.
|
||||
let mut removed_nodes = RootedVec::new();
|
||||
removed_nodes.extend(parent.children().map(|child| JS::from_rooted(&child)));
|
||||
let removed_nodes = parent.children().collect::<RootedVec<_>>();
|
||||
// Step 3.
|
||||
let mut added_nodes = RootedVec::new();
|
||||
let added_nodes = if let Some(node) = node.as_ref() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue