Event
인터페이스의 읽기 전용 속성인 isTrusted
는, 이벤트가 사용자 행위에 의하여 발생되었으면 true
이고 이벤트가 스크립트로 인해 생성 또는 수정되었거나 dispatchEvent
를 통해 보내졌으면 false
인 논리 값입니다. 이것이 true
인 이벤트는 신뢰된다고 표현합니다.
구문
var bool = event.isTrusted;
예제
if(event.isTrusted) { // 이 이벤트는 신뢰됩니다. } else { // 이 이벤트는 신뢰되지 않습니다. }
명세
명세 | 상태 | 비고 |
---|---|---|
DOM The definition of 'Event.isTrusted' in that specification. |
Living Standard | |
Document Object Model (DOM) Level 3 Events Specification The definition of 'Trusted events' in that specification. |
Obsolete | 이벤트가 신뢰되기 위한 요건을 추가하였으나 isTrusted 속성을 정의하지는 않았습니다. |
브라우저 호환성
BCD tables only load in the browser
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.