# Javascript assets in a theme component

**URL:** <https://meta.discourse.org/t/javascript-assets-in-a-theme-component/189109>\
**Category:** Development\
**Created:** [May 4, 2021, 8:19am UTC](https://meta.discourse.org/t/javascript-assets-in-a-theme-component/189109 "2021-05-04T08:19:44Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![Hubbe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hubbe/32/212629_2.png) [@Hubbe](https://meta.discourse.org/u/Hubbe)\
**Post date:** [May 7, 2021, 3:22am UTC](https://meta.discourse.org/t/javascript-assets-in-a-theme-component/189109/16 "2021-05-07T03:22:49Z")

</div>

I decided to try a simpler approach.  
I just create an iframe which loads an HTML page which can do all the ugly script things to make the preview work. Right now it’s not in a re-usable format, but it would be relatively simple to create a plugin for it.

---

_[View the full topic](https://meta.discourse.org/t/javascript-assets-in-a-theme-component/189109)._
