JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<body>
<script>
function testFunc(){
alert("onmouseup called");
}
</script>
<input type="button" value="Test" id="x" onmouseup="testFunc()"/>
<script>
document.getElementById("x").onmouseup();
</script>
</body>
</html>