it now feels wrong to me to have behavior in HTML markup.
i get it, it's easy and simple. and has worked for many frameworks. but things like that are bound to be abused and i am already seeing traces of such abuse in the examples:
<form hx-encoding='multipart/form-data' hx-post='/upload'
_='on htmx:xhr:progress(loaded, total) set #progress.value to (loaded/total)*100'>
...
maybe we should leave markup for HTML, styling for CSS, and behavior for JavaScript, TypeScript or similar.
The first two attributes are htmx and are pure declarative markup, which is the idea with htmx. htmx and hyperscript are designed to work well together, as this demo shows, but they are separate concepts and htmx tries very hard to stay within the original hypermedia model.
i get it, it's easy and simple. and has worked for many frameworks. but things like that are bound to be abused and i am already seeing traces of such abuse in the examples:
maybe we should leave markup for HTML, styling for CSS, and behavior for JavaScript, TypeScript or similar.