mirror of
https://github.com/servo/servo.git
synced 2025-06-19 22:59:03 +01:00
Implemented Node.adoptNode
Spec: http://dom.spec.whatwg.org/#dom-document-adoptnode
This commit is contained in:
parent
8a457a2caa
commit
990545c310
4 changed files with 19 additions and 1 deletions
|
@ -1016,7 +1016,7 @@ impl Node {
|
|||
}
|
||||
|
||||
// http://dom.spec.whatwg.org/#concept-node-adopt
|
||||
fn adopt(node: &mut JS<Node>, document: &JS<Document>) {
|
||||
pub fn adopt(node: &mut JS<Node>, document: &JS<Document>) {
|
||||
// Step 1.
|
||||
match node.parent_node() {
|
||||
Some(ref mut parent) => Node::remove(node, parent, Unsuppressed),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue