update JS with correct event listener API form