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

More Helpful Variant Of Click Event #51

Open
dyoder opened this issue Jul 11, 2024 · 0 comments
Open

More Helpful Variant Of Click Event #51

dyoder opened this issue Jul 11, 2024 · 0 comments

Comments

@dyoder
Copy link
Contributor

dyoder commented Jul 11, 2024

The current click even is just a more compact way to set up an event handler. However, in practice, we often want access to the effective target (ex: a button rather than a span inside the button). To do this now, we need to use helpers to grab the closest ancestor that matches the original selector (ex: button).

Options:

  • Have the click handler do this for you. Drawback: you might not want that.
  • Provide an alternative combinator (ex: button or navigate). Drawback: confusing?
  • Require use of combinators (ex: closest) to get to the “real” target. Drawback: inexpressive.
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