Comparison of Event Targets
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/Event/Comparison_of_Event_Targets
What specific section or headline is this issue about?
the first table on the page
What information was incorrect, unhelpful, or incomplete?
I think there is a mistake. the purpose of event.target and event.currentTarget are switched.
What did you expect to see?
in the table, the purpose of 'event.target' and 'event.currentTarget' should be switched.
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
No response
MDN metadata
Page report details
- Folder:
en-us/web/api/event/comparison_of_event_targets - MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/Event/Comparison_of_Event_Targets
- GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/api/event/comparison_of_event_targets/index.md
- Last commit: https://github.com/mdn/content/commit/88241bf466f1025d3c2f4ce2752586dd85d1ae13
- Document last modified: 2023-11-02T21:05:11.000Z
No, I think the text is correct.
But the documentation, https://developer.mozilla.org/en-US/docs/Web/API/Event/Comparison_of_Event_Targets, can be updated as a section in Event's documentaion
And the link of the specifications need to update, too.
The current description is correct. target is what the event is fired on and currentTarget is what the listener is attached to. In the eyes of the listener, target may change but currentTarget is always the same; in the eyes of an event that gets passed to many listeneers, target is the same but currentTarget changes.
@skyclouds2001 Agreed but that would be a separate issue (and we also have an entire events reference that probably should be moved)