htmx icon indicating copy to clipboard operation
htmx copied to clipboard

hx-on throws an error when used with event names that contain dots

Open xhaggi opened this issue 2 years ago • 0 comments

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 ':'

xhaggi avatar May 24 '23 16:05 xhaggi