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

**URL:** https://meta.discourse.org/t/how-do-i-add-data-attributes-to-a-script-using-the-html-builder/124026
**Category:** Development
**Created:** [July 26, 2019, 8:10am UTC](https://meta.discourse.org/t/how-do-i-add-data-attributes-to-a-script-using-the-html-builder/124026 "2019-07-26T08:10:55Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [July 26, 2019, 8:51pm UTC](https://meta.discourse.org/t/how-do-i-add-data-attributes-to-a-script-using-the-html-builder/124026/3 "2019-07-26T20:51:01Z")

</div>

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

> [@A tour of how the Widget (Virtual DOM) code in Discourse works](https://meta.discourse.org/t/a-tour-of-how-the-widget-virtual-dom-code-in-discourse-works/40347):
>
> This is out of date. See [Widgets, the Widget API and their roadmap?](https://meta.discourse.org/t/widgets-the-widget-api-and-their-roadmap/292624) The latest builds of Discourse are much faster at rendering topics thanks to our [re-written post stream](https://eviltrout.com/2016/02/25/fixing-android-performance.html). I’ve written up [our new plugin API](https://meta.discourse.org/t/a-new-versioned-api-for-client-side-plugins/40051) but so far haven’t explained how the code all fits together. The purpose of this topic is to allow Discourse developers to understand how the new code works. What’s a Virtual DOM? A Virtual DOM is a data structure that enables browsers to re-render dynamic content very quickly. The techniq…

---

_[View the full topic](https://meta.discourse.org/t/how-do-i-add-data-attributes-to-a-script-using-the-html-builder/124026)._
