Reputation: 756
I'm wondering if there any way to get all html attributes and put them in an Javascript array , I meen all html attributes that can be set to HTML elements including global attributes
Upvotes: 0
Views: 41
Reputation: 1075755
There's no automatic process that will give you that list, no. You'll need to get that information from the specification and maintain your own array, keeping it up to date as the specification evolves. The index provides a handy reference for them, and references the list of globals as well. And you'll want to allow for the fact that any element can have any number of data-*
attributes.
Upvotes: 1