WordPress · infra · fg-0094

't.composedPath(...)[0].getRootNode is not a function' only appears on synthetic events

If you see Uncaught TypeError: t.composedPath(...)[0].getRootNode is not a function, the cause and the fix for WordPress are below, last verified 2026-08-19.

Staletrust 50/100

This trap has not been confirmed recently and may be out of date.

Symptom
Uncaught TypeError: t.composedPath(...)[0].getRootNode is not a functionError shows in session replay tools but real clicks work
Cause
WP Rocket's delayed-JS handler calls getRootNode on the event target without checking it is a Node. An event dispatched on window has no getRootNode, so synthetic events throw; real clicks on page elements do not.
Fix
Do not treat it as a broken button. Reproduce with a real click, not window.dispatchEvent.
Apply
Test with a real pointer click in a browser automation tool rather than window.dispatchEvent(new Event('click'))
Affected
WP Rocket delay JS, August 2026

Last verified 2026-08-19 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun