Event.isTrusted

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Event 인터페이스의 isTrusted 읽기 전용 속성은 사용자 액션에 의해 생성된 이벤트에서는 true, 스크립트에서 생성 또는 수정했거나 EventTarget.dispatchEvent()로 발송한 이벤트의 경우 false인 불리언 값입니다.

예제

js
if (e.isTrusted) {
  // 신뢰할 수 있는 이벤트
} else {
  // 신뢰 불가능한 이벤트
}

명세

Specification
DOM
# ref-for-dom-event-istrusted①

브라우저 호환성

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
isTrusted

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
See implementation notes.