HTML DOM Document renameNode() method

Definition and usage

Not recommended for use renameNode() Method. Do not use it.

It will throw an error in all new browsers (renameNode is not a function).

Description

renameNode() The method is a feature of DOM Core Level 3 (2004).

It is applied to rename nodes of Element and Attr types.

Alternative Solutions:

For elements: delete the element and create a new element.

For attributes: delete the attribute and create a new attribute.