That's almost exactly what I was thinking of. There does look to be a big caveat with it though - instead of JS, it has an ECMAScript variant called TIScript. I'm sure this was a good choice when it was made, but javascript libraries and tooling are a lot to miss out on now.