This DOM adoptNode() method is used to adopt a node from another document. All node types can be adopted. All child nodes along with the original node can be adopted. AdoptNode() method is used to return node objects.
Parameter Value: DOM adoptNode() method contains only one method described below.
- node: Any type of node is required.
Return Value: It returns a node object, representing the adopted node.
Before pressing the button:
After pressing the button:
Note: All child nodes are adopted.
Browser Support: The browsers support by DOM adoptNode() method are listed below:
- Google Chrome
- Internet Explorer