Skip to content

More Helpful Variant Of Click Event #51

Description

@dyoder

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions