add generated JS code for convenience