Event.isTrusted is an attribute that is true when the event was generated by a user action, and false when the event was created or modified by script, or dispatched via dispatchEvent.

Demo

Documentation

Specification

Established standard

Status in Chromium

Blink


Enabled by default (tracking bug) in:

  • Chrome for desktop release 46
  • Chrome for Android release 46
  • Android WebView release 46

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

Owners

Comments

Intended primarily for use by extensions, to determine if an event was dispatched by a script running in the main world.

Last updated on 2020-11-09