Javascript assets in a theme component

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.