[js] A better onChange event