Working with restricted attributesControlling classes with the HTML5 classList

"data-" attribute prefix

Définir un attribut : data-<nom>

Y accéder : node.dataset.<nom>

Le modifier : node.dataset.<nom> = “quelque chose”

Support : caniuse.com/dataset

setAttribute + getAttribute sont plus sûrs car plus supportés.