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 GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
isTrusted |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.