Removes the attribute name from the target.
name
target
Tag name of the Element representation of target.
Element, EventTarget, or CSS selector.
Name of the attribute to remove.
Element representation of the specified target.
elements!InvalidElementError if the specified target wasn't found.
elements!InvalidElementError
HTML (Before)
<button id="example" aria-disabled="true"> Example</button> Copy
<button id="example" aria-disabled="true"> Example</button>
Code
let element = findElement("#example")!;element = removeAttribute(element, "aria-disabled"); Copy
let element = findElement("#example")!;element = removeAttribute(element, "aria-disabled");
HTML (After)
<button id="example"> Example</button> Copy
<button id="example"> Example</button>
Removes the attribute
name
from thetarget
.