Hacker News new | ask | show | jobs
by seumars 1160 days ago
What's the consensus on using custom HTML attributes such as "hx-post", "hx-trigger" and so on, which are "invalid" according to the spec? I don't mind prepending data- to custom attributes but it's still a minor nuisance.
1 comments

Data attributes are accepted. From the docs:

> It’s worth mentioning that, if you prefer, you can use the data- prefix when using htmx:

> <a data-hx-post="/click">Click Me!</a>