convert events to js