Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ws] [ECR] Ability to differentiate response based on triggering event #74

Open
aral opened this issue Aug 12, 2024 · 0 comments
Open

Comments

@aral
Copy link
Contributor

aral commented Aug 12, 2024

Use case:

I have an element that can either be swiped left or swiped right. It’s hx-trigger looks like this:

hx-trigger='swiped-left, swiped-right'

On the server, I can’t differentiate whether it was a swipe left or swipe right.

Suggested enhancement

Add the triggeringEvent’s type to the HEADERS that are sent with the message so I can differentiate between a swipe left and swipe right on my element.

e.g., the header could be:

 'HX-Trigger-Event': 'swiped-right'
aral added a commit to aral/htmx-extensions that referenced this issue Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant