getAttributeNames

The getAttributeNames() method of the Element interface returns the attribute names of the element as an Array of strings.

MDN Reference