construct.net/en/tutorials/bridging-js-c2-691
Develop games in your browser. Powerful, performant & highly capable.
I think this is what you're after:
Scripting in Construct 3