Events role javascript finished