Normalize JS events