JavaScript Event currentTarget Property

Beginner
⏱️ 10 min read
📚 Updated: Jul 2026
🎯 5 Examples
🚀 5 Try-it labs
Baseline Widely available
Instance property

What You’ll Learn

The currentTarget property is a read-only EventTarget that identifies the object your event handler is attached to. Learn how it differs from event.target, why it is null outside a handler, and how it powers event delegation—with five examples and try-it labs.

01

Kind

Instance property

02

Type

EventTarget

03

Means

Handler’s element

04

vs target

Origin element

05

Outside handler

null

06

Status

Baseline widely

Introduction

When you click a nested element, the event may bubble up to a parent that owns the listener. event.target is the nested element that was clicked. event.currentTarget is the parent that has the handler.

That difference is the heart of event delegation: one listener on a parent, many possible children as target, one stable currentTarget.

💡
Beginner tip

MDN: currentTarget is only meaningful inside the handler. If you store the event and read currentTarget later, it will be null.

Understanding Event.currentTarget

An instance property that answers: “Which object is running this listener right now?”

  • Value — an EventTarget (often an Element) the handler is attached to.
  • Read-only — you do not assign to it.
  • During the handler — set to that attached target.
  • Outside the handlernull (MDN).
  • Baseline Widely available on MDN (since July 2015); also in Web Workers.

📝 Syntax

JavaScript
event.currentTarget

Value

An EventTarget representing the object to which the current event handler is attached.

Typical read inside a listener

JavaScript
parent.addEventListener("click", (event) => {
  console.log(event.currentTarget); // the parent
  console.log(event.target);        // parent or a child
});

⚠️ Why currentTarget Becomes null

After the handler finishes, the browser clears currentTarget. Saving the event object does not keep a lasting reference to the attached element via this property.

JavaScript
let saved;

button.addEventListener("click", (event) => {
  saved = event;
  console.log(event.currentTarget); // the button
});

// Later (outside the handler):
console.log(saved.currentTarget); // null

If you need the element later, store event.currentTarget (or its id) in your own variable while still inside the handler.

⚡ Quick Reference

GoalCode / note
Handler’s elementevent.currentTarget
Clicked / origin elementevent.target
Keep a referenceCopy it inside the handler (not after)
Arrow listenersPrefer event.currentTarget over this
MDN statusBaseline Widely available (since July 2015)

🔍 At a Glance

Four facts to remember about Event.currentTarget.

Type
EventTarget

Read-only

Means
listener host

Where handler lives

Outside
null

After handler ends

Baseline
widely

Since July 2015

Examples Gallery

Examples follow MDN Event: currentTarget. Use View Output or Try It Yourself.

📚 Getting Started

MDN parent/child demo and the equal-target case.

Example 1 — currentTarget vs target (MDN)

Listener on the parent; click parent or child and compare both properties.

JavaScript
const output = document.querySelector("#output");
const parent = document.querySelector("#parent");

parent.addEventListener("click", (event) => {
  const currentTarget = event.currentTarget.getAttribute("id");
  const target = event.target.getAttribute("id");
  output.textContent = `Current target: ${currentTarget}\n`;
  output.textContent += `Target: ${target}`;
});
Try It Yourself

How It Works

In both parent and child clicks, currentTarget stays parent because that is where the handler is attached.

Example 2 — Same When You Click the Listener Element

If the event starts on the element that owns the listener, both match.

JavaScript
button.addEventListener("click", (event) => {
  console.log(event.currentTarget === event.target); // true
});
Try It Yourself

How It Works

No bubbling from a child is involved, so origin and listener host are the same node.

📈 Null, Delegation & this

Lifetime the null gotcha and everyday patterns.

Example 3 — null Outside the Handler

Save the event, then read currentTarget after the handler returns.

JavaScript
let saved = null;

button.addEventListener("click", (event) => {
  saved = event;
  console.log("inside:", event.currentTarget && event.currentTarget.id);
  setTimeout(() => {
    console.log("later:", saved.currentTarget); // null
  }, 0);
});
Try It Yourself

How It Works

Copy what you need (id, class, dataset) while still inside the handler.

Example 4 — Event Delegation

One listener on a list; use target for the item and currentTarget for the list.

JavaScript
list.addEventListener("click", (event) => {
  const item = event.target.closest("li");
  if (!item || !event.currentTarget.contains(item)) return;

  console.log("list id:", event.currentTarget.id);
  console.log("item text:", item.textContent);
});
Try It Yourself

How It Works

currentTarget stays the list even when you click text inside an li.

Example 5 — this vs currentTarget

Function listeners get this === currentTarget; arrow functions do not.

JavaScript
button.addEventListener("click", function (event) {
  console.log(this === event.currentTarget); // true
});

button.addEventListener("click", (event) => {
  console.log(this === event.currentTarget); // usually false
  console.log(event.currentTarget.id);       // reliable
});
Try It Yourself

How It Works

Prefer event.currentTarget in arrow listeners so you always read the attached element.

🚀 Common Use Cases

  • Event delegation on lists, tables, and toolbars.
  • Reading attributes / dataset from the element that owns the listener.
  • Comparing origin (target) vs listener host (currentTarget) while debugging.
  • Arrow-function handlers where this is not the element.
  • Teaching bubbling with a clear parent/child demo.

🔧 How It Works

1

Listener is attached

You call addEventListener on an element (or other EventTarget).

Setup
2

Event fires / bubbles

target is the origin; the event may travel to ancestors.

Dispatch
3

Handler runs

currentTarget is set to the object that owns this listener.

Inside
4

Handler ends

currentTarget becomes null on the saved Event object.

📝 Notes

Universal Browser Support

Event.currentTarget 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.currentTarget

Read-only EventTarget: the object to which the current event handler is attached.

Universal Widely available
Google Chrome Full support · Desktop & Mobile
Full support
Mozilla Firefox Full support · Desktop & Mobile
Full support
Apple Safari Full support · macOS & iOS
Full support
Microsoft Edge Full support · Chromium
Full support
Opera Full support · Modern versions
Full support
Internet Explorer Supported (legacy)
Full support
Event.currentTarget Excellent

Bottom line: Use currentTarget for the listener host and target for the origin. Read it only inside the handler.

Conclusion

Event.currentTarget is the element (or other EventTarget) your handler is attached to. Pair it with event.target to understand bubbling and delegation, and remember it is null outside the handler.

Continue with defaultPrevented, bubbles, addEventListener(), or the JavaScript hub.

💡 Best Practices

✅ Do

  • Use currentTarget for the listener host
  • Use target (or closest) for the origin / item
  • Copy values you need before the handler returns
  • Prefer event.currentTarget in arrow listeners
  • Leverage one parent listener for many children

❌ Don’t

  • Read currentTarget after the handler finishes
  • Assume target is always the element you listened on
  • Rely on this inside arrow function listeners
  • Confuse currentTarget with cancelable
  • Skip checking that a delegated target is inside the list

Key Takeaways

Knowledge Unlocked

Five things to remember about currentTarget

Listener host vs event origin—and null outside.

5
Core concepts
🎯02

vs target

origin element

Compare
03

Outside

becomes null

Gotcha
📋04

Delegation

one parent listener

Pattern
🎯05

Baseline

since Jul 2015

Status

❓ Frequently Asked Questions

It is a read-only property that identifies the EventTarget (usually an element) to which the current event handler is attached—not necessarily the element that was clicked or fired on.
No. MDN marks Event.currentTarget as Baseline Widely available (since July 2015). It is not Deprecated, Experimental, or Non-standard. It is also available in Web Workers.
event.target is where the event originated (for example the child that was clicked). event.currentTarget is the element that has this listener. With bubbling and delegation they often differ.
MDN notes that currentTarget is only available inside an event handler. If you save the Event object and read currentTarget later outside the handler, it is null.
Use it when your listener is on a parent (delegation) and you need a stable reference to that parent, or when you want the element the handler was bound to rather than a nested click target.
For a normal function listener registered with addEventListener, this usually equals event.currentTarget. Arrow functions do not get their own this, so prefer event.currentTarget there.
Did you know?

During capturing and bubbling, the same event object is reused as it visits each listener. That is why currentTarget changes (or clears) depending on which handler is running—and why it is empty once dispatch is done.

Next: defaultPrevented

See whether preventDefault successfully blocked the default action.

defaultPrevented →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful