Re:HTML First – Six principles for building simple, maintain...
by 8organicbits on Sunday November 12, 2023 @11:34AM
(#38241657)
Does anyone have a good list of vanilla approaches? I'm a fan of details/summary, but I'm sure there are more I don't know.
[ Parent
| on HN ]
Re:HTML First – Six principles for building simple, maintain...
by HerrBertling on Sunday November 12, 2023 @11:41AM
(#38241732)
I like datalist quite a bit for „poor man‘s autocomplete“ - you can dynamically fill it via JS and will get the suggestions shown in the completion fields above the keyboard on mobile and… well, something (?) on desktop. Not as nice as an autocomplete, but with way less issues re accessibility etc.
Edit: Forgot two things:
- You can disable the `fieldset` attribute to disable all inputs within. So properly nest your forms and you‘ll have a simpler way of controlling forms.
- Buttons can have a `value` attribute which works great to differentiate between various action paths for e.g. list items (delete, edit,…)
Re:HTML First – Six principles for building simple, maintain...
by ChrisAntaki on Sunday November 12, 2023 @11:39AM
(#38241712)
These vanilla JavaScript features are pretty great IMO
- https://developer.mozilla.org/en-US/docs/Web/API/Document/qu...
- https://developer.mozilla.org/en-US/docs/Web/API/Document/qu...
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- https://developer.mozilla.org/en-US/docs/Web/API/Element/ins...
- https://developer.mozilla.org/en-US/docs/Web/API/EventTarget...
- https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
Re:HTML First – Six principles for building simple, maintain...
by calvinmorrison on Sunday November 12, 2023 @11:44AM
(#38241756)
Tbf they got better. Jquery basically existed because the js builtins were hairy