getAttributeNames

The getAttributeNames JS Element returns the qualified names of all element’s attributes. Can contain duplicates.

Syntax

element.getAttributeNames()

Examples

1 · html

2 · xml

attachShadow

classList

className

closest

getAttribute

getAttributeNS

hasAttribute

hasAttributeNS

hasAttributes

id

innerHTML

insertAdjacentHTML

localName

matches

namespaceURI

outerHTML

prefix

removeAttribute

removeAttributeNS

setAttribute

setAttributeNS

shadowRoot

slot

tagName

toggleAttribute

Web Hypertext Application Technology Working Group (WHATWG)

Home Menu