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
Status in Chromium
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.
- Shipped/Shipping
- Shipped/Shipping
- No signal
- No signals
Owners
Last updated on 2020-11-09
Comments
Intended primarily for use by extensions, to determine if an event was dispatched by a script running in the main world.