Element: removeAttributeNode() method
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The removeAttributeNode() method of the Element interface removes the specified Attr node from the element.
If you don't need to inspect the attribute node before removing it, you can use the Element.removeAttribute() method instead.
Syntax
js
removeAttributeNode(attributeNode)
Parameters
attributeNode-
The attribute node to remove from the element.
Return value
The attribute node that was removed.
Exceptions
NotFoundErrorDOMException-
Thrown when the element's attribute list does not contain the attribute node.
Examples
js