Implemented Node.adoptNode

Spec:
http://dom.spec.whatwg.org/#dom-document-adoptnode
This commit is contained in:
Bruno de Oliveira Abinader 2014-03-17 00:56:21 -04:00
parent 8a457a2caa
commit 990545c310
4 changed files with 19 additions and 1 deletions

View file

@ -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),