Esta tradução está incompleta. Por favor, ajude a traduzir este artigo.


A propriedade  isTrusted da interface Event, exclusiva para leitura, é uma booleana (Boolean) de valor verdadeiro (true) se tal evento é disparado pela ação do usuário. Retorna falso (false) caso o acionamento do evento seja ocasionado pelo método EventTarget.dispatchEvent() ou tenha sido criado ou modificado por um script.
 

Sintaxe

var eventIsTrusted = event.isTrusted;

Valor

Boolean

Exemplo

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

Especificações

Especifiação Status Comentário
DOM
The definition of 'Event.isTrusted' in that specification.
Padrão em tempo real  
Document Object Model (DOM) Level 3 Events Specification
The definition of 'Trusted events' in that specification.
Obsoleto Amplia requisito para confiabilidade de um evento, embora isto não defina por si só a propriedade isTrusted.

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
isTrustedChrome Full support 46
Notes
Full support 46
Notes
Notes Starting with Chrome 53 and Opera 40, untrusted events do not invoke the default action.
Edge Full support 12Firefox Full support YesIE No support No
Notes
No support No
Notes
Notes In Internet Explorer, all events are trusted except those that are created with the createEvent() method.
Opera Full support 33
Notes
Full support 33
Notes
Notes Starting with Chrome 53 and Opera 40, untrusted events do not invoke the default action.
Safari No support NoWebView Android Full support 46
Notes
Full support 46
Notes
Notes Starting with version 53, untrusted events do not invoke the default action.
Chrome Android Full support 46
Notes
Full support 46
Notes
Notes Starting with Chrome 53 and Opera 40, untrusted events do not invoke the default action.
Edge Mobile Full support YesFirefox Android Full support YesOpera Android Full support 33
Notes
Full support 33
Notes
Notes Starting with Chrome 53 and Opera 40, untrusted events do not invoke the default action.
Safari iOS No support NoSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.

Etiquetas do documento e colaboradores

Colaboradores desta página: mdnwebdocs-bot, AnarcoPhysics
Última atualização por: mdnwebdocs-bot,