Re: [whatwg] RadioNodeList and buttons

On 10/31/17 6:23 AM, Regis Kuckaertz wrote:
> formElement.onsubmit = (evt) => {
>    evt.preventDefault();
>    const button = evt.target.elements.namedItem('action');
>    const value = button.value

If this returned buttons, which button would you expect it to return in 
various situations and why?

> Here is my question: if the UA handles this situation without a glitch,
> wouldn't you expect the corresponding DOM API to expose the same behaviour?

I just checked one UA (Firefox), and the way it handles this situation 
is that it stores the "submitter" (in the sense of the argument to 
<https://html.spec.whatwg.org/#form-submission-algorithm>) on the 
"submit" event itself.  Exposing it as a property on that event would 
make a lot of sense to me.

-Boris

Received on Tuesday, 31 October 2017 14:23:40 UTC