Revision Information
• Revision slug: Web/API/document.adoptNode
• Revision title: document.adoptNode
• Revision id: 474065
• Created:
• Creator: kscarfone
• Is reviewed? Yes
• Reviewed:
• Reviewed by: kscarfone
• Is approved? Yes
• Is current revision? No
• Comment Updated tags

{{DomRef}}

## Summary

Adopts a node from an external document. The node and its subtree is removed from the document it's in (if any), and its `ownerDocument` is changed to the current document. The node can then be inserted into the current document.

Supported since Gecko 1.9 (Firefox 3)

## Syntax

```node = document.adoptNode(externalNode);
```
• `node` is the adopted node that can be used in the current document. The new node's `parentNode` is `null`, since it has not yet been inserted into the document tree.
• `externalNode` is the node from another document to be adopted.

{{todo}}

## Notes

In general the `adoptNode` call may fail due to the source node coming from a different implementation, however this should not be a problem with browser implementations.

{{WRONG_DOCUMENT_ERR_note}}