JSFiddle - React, Tailwind, and code Playground
HTML
<input id="abcd" name="abcd" type="checkbox" onchange="doSomething(this, 'otherparams');">
<button onclick="fireCBChange();">Try</button>
<div id="status">Status here</div>
JavaScript
function doSomething(cb, params) {
document.getElementById("status").innerHTML="CHANGED!";
setTimeout(function() {
document.getElementById("status").innerHTML="....";
}, 2000);
}
function fireCBChange() {
document.getElementById("abcd").checked=true;
};