bigskysoftware / bigskysoftware/htmx

Event targets are not documented

Open
#4,002 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

There should be some way to know what targets (and by "target" I mean [`Event.target`](https://developer.mozilla.org/en-US/docs/Web/API/Event/target)) certain `htmx:*` events have.

One might say "obviously, it's the element that triggered the htmx request" but that might not be obvious for everyone, and is also apparently not true, for example the target of `htmx:*:settle` is the _first_ newly swapped-in element...

I started summarizing my empirical findings here: https://gist.github.com/salomvary/227c0b538330cdf238b8f7a938fb3ebf

I tried looking for docs here: https://htmx.org/reference/#events and here: https://four.htmx.org/reference#events.

Contributor guide

Open the contributing guide

Research direction

Read the existing event references at htmx.org/reference/#events and four.htmx.org/reference#events, then compare them with the empirical findings in the linked gist. Document the target associated with each relevant htmx:* event, including exceptions such as htmx:*:settle, so readers can determine targets from the event documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.