Source:
An example of how to expand functionality by running various scripts written in other languages like JS or HTML directly in 1C applications:
You can download *.dt file to develop your own application:
JavaScriptIn.dt
Also, you can try creating the file from scratch using this developer guide.