We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE

翻譯不完整。請協助 翻譯此英文文件

Event 介面的 isTrusted 唯讀屬性為一個布林值,若事件物件是由使用者操作而產生,則 isTrusted 值為 true。若事件物件是由程式碼所建立、修改,或是透過 EventTarget.dispatchEvent() 來觸發,則 isTrusted 值為 false


var bool = event.isTrusted;


 if (e.isTrusted) {
     /* The event is trusted. */
 } else {
     /* The event is not trusted. */


Specification Status Comment
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 Adds requirements regarding trusted and untrusted events, though it does not itself define the isTrusted property.
The definition of 'Event.isTrusted' in that specification.
Obsolete Initial definition.


We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 46.0 (Yes) No support [1] 33 No support
Feature Android Android Webview Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support ? 46.0 (Yes) ? ? 33 No support 46.0

[1] In Internet Explorer, all events are trusted except those that are created with the createEvent() method.


 此頁面的貢獻者: jackblackevo
 最近更新: jackblackevo,