question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change event naming from jQuery style namespace "<event name>.htmx" to "htmx:<event name>"

See original GitHub issue

Instead of event.htmx have htmx.event. E.g. instead of afterOnLoad.htmx have htmx.afterOnLoad. This is more natural to read especially when it comes to Hyperscript.

Maybe this can be restricted to Hyperscript which can have this convention of namespace.event

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
bencrokercommented, Jun 23, 2020

The eventName.htmx did strike me as strange at first, so I’m glad to see that this is being reconsidered. I find htmx.eventName an improvement, however htmx:eventName would be my personal preference.

Read more comments on GitHub >

github_iconTop Results From Across the Web

event.namespace | jQuery API Documentation
event.namespaceReturns: String. Description: The namespace specified when the event was triggered. version added: 1.4.3event.namespace.
Read more >
Documentation - </> htmx
This input will issue a request 500 milliseconds after a key up event if the input has been changed and inserts the results...
Read more >
jQuery: bind namespaces events - Stack Overflow
This only works if I bind to the full event names but this is what I don't know on this position :( jquery....
Read more >
Namespaced Events in jQuery - CSS-Tricks
It's really easy to add an event listener in jQuery. ... Instead of just click as the name of the event, you can...
Read more >
How to check whether the event namespace is used in jQuery
The jQuery is lightweight, and it has a lot of features like HTML/DOM manipulation, CSS manipulation, HTML event methods, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found