allow `{% attrs %}` to render hyphenated attributes ( `aria-label`, `data-script` etc)
lolrenx opened this issue · comments
from htmx.org
htmx gives you access to AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypertext
htmx attributes are represented in templates tags like other attributes.
potential caveat : they are defined with a hyphen hx-get
, hx-target
, hx-swap
...
this enhancement could also increase compatibility with alpine, hyperscript and other frameworks that make use of custom HTML attributes, and attrs that are defined with hyphens such as aria-label
Happy to contribute to implementation
Hey. Thanks for bringing this to my attention. I hadn't considered attributes with hyphens.
I've opened a PR to address the issue. Do let me know if that works for you.
Thanks for your qui response. tried a couple aria-label
and htmx attributes, they render fine!
this will drastically simplify my components, thanks a lot! Now I have to refactor my spaghetti code 👍
This has been released with 0.4.0
awesome, thank you !
I've released version 0.5.0a0
which makes this case "just work" without any workarounds.
pip install slippers==0.5.0a0