adds javascript definition