Come aggiungere attributi dati a uno script utilizzando l'HTML builder

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

6 Mi Piace