Element representation of target.
Element, EventTarget, or CSS selector.
Array of attribute names to remove.
Element representation of the specified target.
elements!InvalidElementError if the specified target wasn't found.
HTML (Before)
<div
id="example"
role="slider"
aria-valuemax="30"
aria-label="Example"
aria-disabled="false"
>
...
</div>
Code
const element = findElement("#example")!;
removeAttributes(element, [
"role",
"aria-valuemax",
"aria-disabled",
]);
HTML (After)
<div
id="example"
aria-label="Example"
>
...
</div>
Removes the attributes with
namesfrom thetarget.