# Modernizing inline script tags for templates & JS API

**URL:** https://meta.discourse.org/t/modernizing-inline-script-tags-for-templates-js-api/366482
**Category:** Development
**Tags:** dev-news
**Created:** [May 19, 2025, 9:55am UTC](https://meta.discourse.org/t/modernizing-inline-script-tags-for-templates-js-api/366482 "2025-05-19T09:55:17Z")
**Posts on this page:** 1
**Showing post:** 44

<div class="post-metadata">

### Author: ![rahim123](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rahim123](https://meta.discourse.org/u/rahim123)
#### Post date: [November 21, 2025, 1:03pm UTC](https://meta.discourse.org/t/modernizing-inline-script-tags-for-templates-js-api/366482/44 "2025-11-21T13:03:38Z")

</div>

Sorry for my slow reply, I’m a bit swamped recently.

Very nice!! It works, it just had these two backwards:

```plaintext
        this.imageSrc = images[randPick];
        this.imageHref = goTo[randPick];

```

I need to read up on the `@tracked` thing (I don’t even know what to call it, tracked variables?) as well as that `constructor` method. I also don’t quite understand how or at what point the `shouldRender` method runs.

Thanks so much for your help with this, I never would have known to use those methods by myself.

---

_[View the full topic](https://meta.discourse.org/t/modernizing-inline-script-tags-for-templates-js-api/366482)._
