bigskysoftware / bigskysoftware/htmx

[htmx 4] `event` missing from `hx-vals` JS expression

Open
#4,031 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
49.4k
Forks
1.7k
Avg merge
3d 22h
Merged PRs (30d)
30

Description

I used to have access to `event` within the `hx-vals` attribute when using the `js:` prefix, so I could pull some data out of a custom event's `detail`. It doesn't seem like that functionality is available any longer in v4. Not sure if that's intended or an oversight (hopefully not the latter!).

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported behavior in htmx 4 with an hx-vals js: expression that reads event.detail from a custom event. Compare it with the previous behavior and determine whether event access is intended; done means the expected behavior is documented by a regression test or the issue is clarified as intentional.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.