Comment ajouter des attributs de données à un script en utilisant le constructeur HTML

There is also this post that explains how the virtual dom / widget part of Discourse works:

6 « J'aime »