The target property is a read-only reference to the EventTarget the event was dispatched onto—for a click, usually the element that was clicked. Learn how it differs from currentTarget, how event delegation works, and MDN’s list demo—with five examples and try-it labs.
01
Kind
Instance property
02
Type
EventTarget
03
Means
Dispatch origin
04
vs
currentTarget
05
Pattern
Delegation
06
Status
Baseline widely
Fundamentals
Introduction
When you click a button, your handler needs to know which element was involved. event.target answers that: it is the object the event was dispatched to.
If the listener is on a parent (bubbling), event.currentTarget is the parent while event.target is still the child that was clicked. That difference powers event delegation—one listener for many children.
💡
Beginner tip
Prefer event.target over the deprecated srcElement alias. Same idea, standard name.
Concept
Understanding Event.target
An instance property that references the object onto which the event was dispatched.
Value — the associated EventTarget.
Read-only — the browser sets it during dispatch.
Different from currentTarget — during bubble/capture, the listener host may not be the origin.
Delegation — listen on a parent; inspect target (often with closest).
Baseline Widely available on MDN (since July 2015); also in Web Workers.
Foundation
📝 Syntax
JavaScript
event.target
Value
The associated EventTarget.
Typical pattern
JavaScript
button.addEventListener("click", (event) => {
console.log(event.target); // the clicked element
console.log(event.target.nodeName); // e.g. "BUTTON"
});
Compare
⚖️ target vs Related Ideas
Idea
Meaning
event.target
Object the event was dispatched to (origin)
event.currentTarget
Element whose listener is running now
event.srcElement
Deprecated alias of target
event.eventPhase
Capture / at-target / bubble stage
element.closest()
Walk up from target to a matching ancestor
Cheat Sheet
⚡ Quick Reference
Goal
Code / note
Read origin
event.target
Node name
event.target.nodeName
Delegation item
event.target.closest("li")
Listener host
event.currentTarget
MDN status
Baseline Widely available (since July 2015)
Snapshot
🔍 At a Glance
Four facts to remember about Event.target.
Type
EventTarget
Read-only
Means
origin
Dispatched to
Pairs with
currentTarget
Listener host
Baseline
widely
Since Jul 2015
Hands-On
Examples Gallery
Examples follow MDN Event: target. Use View Output or Try It Yourself.
📚 Getting Started
Read the origin and compare it with the listener host.
Example 1 — Read event.target
Click a button and log which element was the target.
Event.target is marked Baseline Widely available on MDN (since July 2015). Logos use the shared browser-image-sprite.png sprite from this project. It is also available in Web Workers.
✓ Baseline · Widely available
Event.target
Read-only EventTarget the event was dispatched to — the foundation of clicks, forms, and event delegation.
UniversalWidely available
Google ChromeFull support · Desktop & Mobile
Full support
Mozilla FirefoxFull support · Desktop & Mobile
Full support
Apple SafariFull support · macOS & iOS
Full support
Microsoft EdgeFull support · Chromium
Full support
OperaFull support · Modern versions
Full support
Internet ExplorerSupported (legacy); also had srcElement alias
Full support
Event.targetExcellent
Bottom line: Use event.target for the origin, event.currentTarget for the listener host, and closest() for robust delegation.
Wrap Up
Conclusion
Event.target is the standard, read-only origin of an event. Pair it with currentTarget to understand bubbling, and use it with closest for clean event delegation.
Attach dozens of identical listeners when one parent will do
Forget nested clicks (span inside button / li)
Write new srcElement code
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about target
The standard origin pointer for every Event.
5
Core concepts
🎯01
Origin
dispatched to
API
🔁02
vs
currentTarget
Compare
📋03
Delegation
one parent listener
Pattern
🔍04
closest
robust lookups
DOM
🎯05
Baseline
since Jul 2015
Status
❓ Frequently Asked Questions
It is a read-only property on an Event. It references the EventTarget onto which the event was dispatched—for a click, usually the element that was clicked.
No. MDN marks Event.target as Baseline Widely available (since July 2015). It is not Deprecated, Experimental, or Non-standard. It is also available in Web Workers.
target is where the event originated (the dispatch target). currentTarget is the element whose listener is running right now. They differ during bubbling or capturing when a parent listens for a child event.
You attach one listener to a parent and use event.target (often with closest) to find which child was interacted with. MDN’s list example hides the clicked li via evt.target.
event.srcElement is a deprecated alias for event.target. Always write event.target in new code.
Sometimes engines retarget clicks over text to the parent element. Prefer event.target for portable code; Mozilla-only fields like originalTarget are non-standard.
Did you know?
Inside an event handler, this (for a classic function listener) is often the same as event.currentTarget—not necessarily event.target. Arrow functions do not bind this that way, so prefer reading event.target / event.currentTarget explicitly.