← Chrome 147 reference

v147 · shipped · dom · events

Pseudo target on events

Limited availability

  • Chrome · 147 (desktop, Android, WebView)
  • Edge · not separately reported
  • Firefox · no signal
  • Safari · no signal

Not a Baseline feature: webstatus.dev has no web-features entry for pseudoTarget (queried 2026-10-18; the query returns only the host css-object-model-csspseudoelement interface feature, itself Baseline limited), and BCD api/UIEvent.json records no pseudoTarget subfeature (verified 2026-10-18). Chrome-only.

Chrome 147 adds a pseudoTarget property to UIEvent, AnimationEvent, and TransitionEvent. When an event originates from a CSS pseudo-element such as ::before or ::after, pseudoTarget returns the corresponding CSSPseudoElement object rather than null, letting event handlers distinguish pseudo-element interactions without relying on hit-test workarounds.

at a glance

Shipped inChrome 147 (desktop, Android, WebView)
StatusEnabled by default
New propertyEvent.pseudoTarget
ReturnsCSSPseudoElement or null
SpecCSS Pseudo-Elements Level 4
ChromeStatus5179328935624704 — Pseudo target on events

Status and specification divergence, both sides reported rather than resolved (fetched 2026-10-06): this page records the property as Enabled by default in Chrome 147, while ChromeStatus feature 5179328935624704 reads status “Proposed” with is_released false and no intent stage. On the specification side, this page names css-pseudo-4, but the record’s own spec link points at a UI Events pull request, and the fetched css-pseudo-4 contains no occurrence of pseudoTarget, UIEvent, AnimationEvent or TransitionEvent — it defines only the CSSPseudoElement interface this property returns, which MDN likewise documents without naming the property. The page is also inconsistent with itself about which events carry it: the lede names UIEvent, AnimationEvent and TransitionEvent while the at-a-glance row says Event.pseudoTarget.

why it exists

CSS pseudo-elements like ::before and ::after generate rendered content and are fully interactive — they receive pointer events, fire animation events, and participate in transitions. Before Chrome 147, Event.target always referred to the originating DOM element, with no way to tell programmatically that the interaction happened on a pseudo-element rather than the element itself. Developers resorted to geometry calculations or layout mirrors to infer the hit. pseudoTarget closes this gap directly in the event object.

Source: blink-dev Intent to Ship — Pseudo target on events, April 2026.

Syntax

The specification change is w3c/uievents PR #413 “Add .pseudoTarget property to selected event types” — still an open pull request as of 2026-10-18, not merged UI Events text. Its IDL additions, verbatim: to the UIEvent interface

readonly attribute CSSPseudoElement? pseudoTarget;

and to the UIEventInit dictionary

CSSPseudoElement? pseudoTarget = null;

Nullability per the PR and its review thread: the attribute is null when the event did not originate from a pseudo-element, when currentTarget is null (including after dispatch has finished — the author confirmed on 2026-07-08 it would be “always null after dispatch”), and when Shadow DOM retargeting against currentTarget would otherwise expose shadow-internal nodes. Disclosed: the PR’s visible IDL covers UIEvent (whose subtypes inherit it); AnimationEvent and TransitionEvent are Event subtypes, so their coverage — named by the lede and the intent below — is not in that IDL fragment and rests on the intent and Chrome’s implementation (runtime flag EventPseudoTargetProperty, status: "stable", depends_on CSSPseudoElementInterface in the runtime flag registry, read 2026-10-18).

Source: w3c/uievents#413 (IDL quoted verbatim from the PR diff, fetched 2026-10-18); runtime_enabled_features.json5

shape of the API

The pseudoTarget property

Every UIEvent, AnimationEvent, and TransitionEvent now carries a pseudoTarget property:

Supported event types

InterfaceTypical events
UIEventclick, pointerdown, focus, keydown, …
AnimationEventanimationstart, animationend, animationiteration
TransitionEventtransitionstart, transitionend, transitionrun

Note: mouseover, mouseout, mouseenter, mouseleave, and their pointer* hover counterparts are not yet supported.

Source: blink-dev Intent to Ship — Pseudo target on events, April 2026.

example

Live example from the Chrome Platform Showcase (concept route HEAD-checked 200, 2026-10-18).Source: chrome-platform-showcase

Detecting a click on ::after

const box = document.querySelector('.box');

box.addEventListener('click', (event) => {
  if (event.pseudoTarget !== null) {
    console.log('Clicked on pseudo-element:', event.pseudoTarget.type);
    // e.g. "::after"
    console.log('Originating element:', event.pseudoTarget.element);
  } else {
    console.log('Clicked on the element itself');
  }
});

Reacting to a transition on ::before

document.addEventListener('transitionend', (event) => {
  if (event.pseudoTarget?.type === '::before') {
    // A ::before pseudo-element finished its CSS transition
    const host = event.pseudoTarget.element;
    host.classList.remove('transitioning');
  }
});
Source: blink-dev Intent to Ship — Pseudo target on events, April 2026.

browser compatibility

BrowserpseudoTarget
Chrome (desktop)147
Chrome Android / WebView147
EdgeNot separately reported
FirefoxNo — no signal
SafariNo — no signal

BCD api/UIEvent.json has no pseudoTarget entry yet (verified 2026-10-18), so this table is interim data from the ChromeStatus record, labelled as such; vendor rows reflect the record’s “No signal” views.

Source: chromestatus.com feature page (re-read 2026-10-18); mdn/browser-compat-data api/UIEvent.json

Specifications

SpecificationStatus
UI Events — w3c/uievents PR #413, “Add .pseudoTarget property to selected event types”Open pull request (not merged as of 2026-10-18)
CSS Pseudo-Elements Level 4 — the CSSPseudoElement interface the property returnsEditor’s Draft

see also