JavaScript Event originalTarget Property

Beginner
5 min read
Updated: Nov 2026
3 examples
Property

Definition

Event.originalTarget is a read-only Mozilla property that returns the original target of the event before any retargetings. Unlike explicitOriginalTarget, it can also be native anonymous content (MDN).

Read the notes below before you rely on this property. Prefer feature detection when support is limited.

Syntax

Use event.originalTarget. Start with this line.

JavaScript
event.originalTarget
CallWhat it does
event.originalTargetPrimary signature.

Built into the browser. Read event.originalTarget on an Event instance — no import required.

Library declarations
JavaScript
event.originalTarget

Parameters

ParameterDescription
Feature detectRequired. Property may be missing

Return Value

Return ValueDescription
*The current value of event.originalTarget.

JavaScript Examples

Example 1 — Feature-Detect Support

Check whether this browser exposes the property before reading it.

JavaScript
button.addEventListener("click", (event) => {
  if ("originalTarget" in event) {
    console.log("supported");
    console.log(event.originalTarget.nodeName);
  } else {
    console.log("not available — use event.target");
    console.log(event.target.nodeName);
  }
});
Try It Yourself

How It Works

  1. Listen for click. The handler receives a real Event.
  2. Detect first. in checks whether the property exists on that event.
  3. Firefox path. If present, log the original target’s nodeName.
  4. Fallback. Otherwise use standard event.target.

Example 2 — Compare with event.target

Print both names side by side (unsupported browsers show a clear fallback).

JavaScript
box.addEventListener("click", (event) => {
  const ot = ("originalTarget" in event)
    ? event.originalTarget
    : null;

  console.log("target:", event.target.nodeName);
  console.log(
    "originalTarget:",
    ot ? ot.nodeName : "(unsupported)"
  );
});
Try It Yourself

How It Works

  1. Read the standard target. event.target works everywhere.
  2. Optionally read OT. Only if the property exists.
  3. Compare names. On many clicks they match; Firefox retarget cases may differ.
  4. Stay portable. Treat missing support as normal outside Firefox.

Example 3 — vs explicitOriginalTarget

MDN contrast: originalTarget may include anonymous content; EOT never does.

JavaScript
el.addEventListener("click", (event) => {
  const hasOT = "originalTarget" in event;
  const hasEOT = "explicitOriginalTarget" in event;

  console.log("target:", event.target.nodeName);
  console.log(
    "originalTarget:",
    hasOT ? event.originalTarget && event.originalTarget.nodeName : "(unsupported)"
  );
  console.log(
    "explicitOriginalTarget:",
    hasEOT
      ? event.explicitOriginalTarget && event.explicitOriginalTarget.nodeName
      : "(unsupported)"
  );
});
Try It Yourself

How It Works

  1. Detect both Firefox properties. Either may be missing outside Gecko.
  2. Log the standard target. Always available for comparison.
  3. MDN difference. originalTarget can be anonymous content; EOT cannot.
  4. Learning goal. Know the pair exists — still prefer event.target in apps.

Browser Support

Event.originalTarget is marked Non-standard on MDN. It is a Mozilla-specific property (mainly Firefox / Gecko), not part of a web specification.

✓ Non-standard · Firefox

Event.originalTarget

Read-only original EventTarget before retargeting (may include anonymous content). Expect support primarily in Firefox; feature-detect everywhere else.

Limited Firefox-focused
Mozilla Firefox Supported · Gecko
Supported
Google Chrome Not available
No support
Apple Safari Not available
No support
Microsoft Edge Not available
No support
Opera Not available
No support
Internet Explorer Not a portable API
No support
originalTarget Non-standard

Bottom line: Use for Firefox learning and legacy Gecko code only. Portable apps should rely on event.target (and composedPath() when you need the path).

Frequently Asked Questions

It is a read-only, Mozilla-specific Event property that returns the original target of the event before any retargetings. Unlike explicitOriginalTarget, it can also be native anonymous content. MDN marks it Non-standard.
MDN marks it Non-standard only—not Deprecated or Experimental. It is not part of any web specification and is not on track to become a standard. Prefer event.target for portable code.
Both are Mozilla-specific. MDN says originalTarget can also be native anonymous content, while explicitOriginalTarget never contains anonymous content.
event.target is the standard target after the engine’s retargeting rules. originalTarget aims to keep the pre-retarget original in Firefox, including cases that involve anonymous content.
Primarily Firefox (Gecko). Chrome, Safari, and Edge generally do not expose it. Always feature-detect before reading.
For portable apps use event.target (and event.currentTarget when you need the listener host). For path inspection, consider event.composedPath() where available.

Next: returnValue

Learn the legacy event.returnValue flag and prefer preventDefault() instead.

returnValue tutorial →

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.

6 people found this page helpful