Is there a way to determine which element submitted a form from within an onsubmit handler? Trying to write a generic handler that knows which element was clicked. For examp
My fallback is walking the DOM to find all buttons that could cause a submit, but I'd like to avoid that.
...and adding click listeners to them to store the ‘last clicked’ button which is then read by the submit listener, right?
I can't think of any other way, sorry.