From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/pt-br/web/api/event/istrusted/index.html | 57 ++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 files/pt-br/web/api/event/istrusted/index.html (limited to 'files/pt-br/web/api/event/istrusted') diff --git a/files/pt-br/web/api/event/istrusted/index.html b/files/pt-br/web/api/event/istrusted/index.html new file mode 100644 index 0000000000..711fcae44b --- /dev/null +++ b/files/pt-br/web/api/event/istrusted/index.html @@ -0,0 +1,57 @@ +--- +title: Event.isTrusted +slug: Web/API/Event/isTrusted +translation_of: Web/API/Event/isTrusted +--- +
{{APIRef("DOM")}}
+A propriedade  isTrusted da interface {{domxref("Event")}}, exclusiva para leitura, é uma booleana ({{domxref("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 {{domxref("EventTarget.dispatchEvent()")}} ou tenha sido criado ou modificado por um script.
+ +
 
+ +

Sintaxe

+ +
var eventIsTrusted = event.isTrusted;
+
+ +

Valor

+ +

{{domxref("Boolean")}}

+ +

Exemplo

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

Especificações

+ + + + + + + + + + + + + + + + + + + +
EspecifiaçãoStatusComentário
{{SpecName('DOM WHATWG', '#dom-event-istrusted', 'Event.isTrusted')}}{{ Spec2('DOM WHATWG') }} 
{{SpecName('DOM3 Events', '#trusted-events', 'Trusted events')}}{{Spec2('DOM3 Events')}}Amplia requisito para confiabilidade de um evento, embora isto não defina por si só a propriedade isTrusted.
+ + + +
+ + +

{{Compat("api.Event.isTrusted")}}

+
-- cgit v1.2.3-54-g00ecf