Live data from Hacker News

Replacing JavaScript with Just HTML

htmhell.dev

1–10 of 296 posts

Re: Replacing JavaScript with Just HTML

#2
> Input with Autofilter Suggestions Dropdown

It's great until you have a typo in the field, or want to show options that don't start with what you typed in but appear near the end of an option (think Google search's autocomplete). There's no way to filter in Javascript and force it to show certain options with . I've resorted to for search suggestions.

Re: Replacing JavaScript with Just HTML

#3
When building out a new app or site, start with the simplest solution like the html-only autofilters first, then add complex behavior later.

It's good to know these things exist so there are alternatives to reaching for a fat react component as the first step.

Re: Replacing JavaScript with Just HTML

#6

When building out a new app or site, start with the simplest solution like the html-only autofilters first, then add complex behavior later. It's good to know these things exist so there are alternatives to reaching for a fat react component as the first step.

[deleted]

Re: Replacing JavaScript with Just HTML

#7
Some of these new HTML features don't fully work in my "ancient" browser. But all of them partially work (ie opening the accordion element doesn't close others but it still opens and closes) and they still remain functional elements I can read and interact with. This puts them far ahead of any javascript implementation which almost universally fail to nothing.

Re: Replacing JavaScript with Just HTML

#8
The details / summary thing absolutely kills me. There’s basically nothing you can’t do with them. Hiding and replacing markers is easy. But every component library just pretends they don’t exist.

It even saves you the effort of all the aria control and expanded tags: these tags don’t need them.

Re: Replacing JavaScript with Just HTML

#9
post #7

Some of these new HTML features don't fully work in my "ancient" browser. But all of them partially work (ie opening the accordion element doesn't close others but it still opens and closes) and they still remain functional elements I can read and interact with. This puts them far ahead of any javascript implementation which almost universally fail to nothing.

What "ancient" browser are you using?

Re: Replacing JavaScript with Just HTML

#10

When building out a new app or site, start with the simplest solution like the html-only autofilters first, then add complex behavior later. It's good to know these things exist so there are alternatives to reaching for a fat react component as the first step.

It’s great to see practical examples that push us to consider what the platform already offers before adding more layers of complexity.
Post reply on HN