Like Ashley said, C2 doesn't generate code. Events will call the code, but its already written and included in runtime.
What you may want to look at is the code of the different plugins and behaviors. They are in the folder "Exporter/HTML5" of Construct 2 and are included in each project you use them in. The runtime.js will be the file that runs during game, and you can look at how every function is implemented in the plugins. The system object and all its functions/expressions/actions/conditions is also present in the exporter.
Once you have looked at it, just understand that C2runtime will every tick evaluate available events, trigger the ones that meet their conditions, and redraw if needed.
in that case, and the plugin forum.