How do I add data attributes to a script using the HTML builder

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

6 Likes