eeue56 / eeue56/elm-html-test

some way to select only elements that have a particular event handler

Open
#54 6 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Elm
Stars
68
Forks
15
PR merge metrics
No merged PRs in 30d

Description

Split from https://github.com/eeue56/elm-html-test/issues/32 by request.

some way to select only elements that have a particular event handler. In this example, find the `div` with the `onClick` handler, and ignore the other `div`s:

```elm
div []
[ div []
[ div [ onClick MyMsg ]
[ div [] [ text "Click me" ] ]
, div [] []
]
, div [] []
]
```

Possible API:
```elm
Query.find [ tag "div", withHandler "click" ]
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the nested Elm example and the proposed Query.find [ tag "div", withHandler "click" ] API. Confirm that selection returns only the div carrying onClick and ignores the other divs; the issue does not name implementation files or tests, so those must be located in the repository.

Written by the indexing model from the issue text.

Assessment

Tech stack
elm
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.