Using Cesium/TerriaJS. Enable javascript in infowindow

I have some javascript I need to run inside the info window but it seems to be getting stripped out. I thought I saw somewhere there was a way to enable javascript inside the info window but I can't find it again.

The InfoBox uses iFrame sandboxing, which you can read about here. If you’re using the default Viewer InfoBox, you can use the below line to disable sandboxing and allow any kind of code to run:

viewer.infoBox.frame.removeAttribute(‘sandbox’);

This thread also has a more robust example of interactive with Cesium via the infobox.

Thanks!