htmx
htmx copied to clipboard
hx-on throws an error when used with event names that contain dots
Unlike hx-trigger, hx-on does not support event names that contain dots.
<div hx-get="/test" hx-trigger="my.custom.event" hx-on="my.custom.event: alert('Fired!')"></div>
Instead htmx throws a SyntaxError:
Uncaught SyntaxError: Unexpected token ':'