Hi! I think you might be looking for something similar to this:
The "javascript"template option is still experimental and currently not officially documented – but you can see usage examples in this thread:
"javascript"