Remove attribute (Beta)
Remove attribute (Beta)
element.removeAttribute(name) / element.removeAttribute(index)
Remove a single attribute from an element.
You can identify the attribute to remove by its name string or by its zero-based index in the attributes array.
This method is equivalent to the element.removeCustomAttribute(name) method.
Beta
These methods are in public beta and may change with future releases.
Syntax
Parameters
name: string — The name of the attribute to remove.index: number — The zero-based position of the attribute in the element’s attributes array.
Returns
Promise<null>
A Promise that resolves to null.