So I have a simple form in RiotJS
<tag-form>
<form onsubmit={handleSubmit} id='someForm'>
<input name='param1' />
<button type="submit">Submit</button>
</form">
<script>
this.handleSubmit=function(e) { console.log(e); }
</script>
</tag-form>
That works just fine when I submit via the button. But when I use an external button to trigger the submit of the form
document.getElementById('someForm').submit();
it doesn't work because it somehow does not run the riotjs onsubmit
function, but the native submit
function, which is not what I want...
How to fix that?