You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 theclosest
ancestor that matches the original selector (ex:button
).Options:
click
handler do this for you. Drawback: you might not want that.button
ornavigate
). Drawback: confusing?closest
) to get to the “real” target. Drawback: inexpressive.The text was updated successfully, but these errors were encountered: