update js event handler