問題文
A single listener is attached to a list element and handles clicks on the items inside it. Inside the handler, which property refers to the item that was actually clicked?
選択肢
- event.currentTarget, which changes as the event travels and therefore always reports the innermost element that the user actually pressed at the moment the handler is executing.
- event.target, which is the element where the event originated.
- event.relatedTarget, which is the element paired with the click.
- The this value inside the handler, which equals the clicked item whenever the handler is written as an arrow function in the surrounding scope.