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

Specification link


Final published standard: Recommendation, Living Standard, Candidate Recommendation, or similar final form

Status in Chromium

Blink


Enabled by default (tracking bug)

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