News for hackers. Stuff that matters.
Re:HTML event handler attributes: down the rabbit hole by config_yml on Wednesday April 27, 2022 @04:00AM (#31177486)
I think the good old form.elements is superior for getting values instead of querySelectorAll, but a lot of people have never even heard of this api. It‘s great if you‘re dealing with forms.

I‘m not sure why the author doesn‘t want to handle form/multipart. Does Go not have good ergonomics for this case?

Re:HTML event handler attributes: down the rabbit hole by duncans on Wednesday April 27, 2022 @05:06AM (#31177875)
Also the author's approach doesn't take into account dealing with multi-value form elements such as `<select multiple>` or multiple `<input type=checkbox>` with the same name which is all handled by standard HTML forms POST encoding.
Re:HTML event handler attributes: down the rabbit hole by eatonphil on Wednesday April 27, 2022 @08:14AM (#31178935)
When you're writing your own code for your own apps you're allowed to make your own assumptions. :)
Re:HTML event handler attributes: down the rabbit hole by wildrhythms on Wednesday April 27, 2022 @10:25PM (#31188148)
Re:HTML event handler attributes: down the rabbit hole by eatonphil on Wednesday April 27, 2022 @08:15AM (#31178949)
Thanks! It had been a while since I've written vanilla JS form code so I forgot about both FormData and form.elements.