Skip to content

Commit

Permalink
Clarify isTrusted
Browse files Browse the repository at this point in the history
Per suggestion in
whatwg/html#1912 (comment).
  • Loading branch information
annevk committed Nov 17, 2016
1 parent 766a5e7 commit 7958b25
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -835,11 +835,17 @@ true if <a>context object</a>'s <a>canceled flag</a> is set, and false otherwise

<hr>

The <dfn attribute for=Event><code>isTrusted</code></dfn> attribute
<p>The <dfn attribute for=Event><code>isTrusted</code></dfn> attribute
must return the value it was initialized to. When an
<a>event</a> is created the attribute must be
initialized to false.

<p class="note no-backref">{{Event/isTrusted}} is a convenience that indicates whether an
<a>event</a> is <a>dispatched</a> by the user agent (as opposed to using
{{EventTarget/dispatchEvent()}}). The sole legacy exception is {{HTMLElement/click()}}, which causes
the user agent to dispatch an <a>event</a> whose {{Event/isTrusted}} attribute is initialized to
false.

The <dfn attribute for=Event><code>timeStamp</code></dfn> attribute
must return the value it was initialized to. When an
<a>event</a> is created the attribute must be
Expand Down Expand Up @@ -1510,8 +1516,7 @@ initialized, and a <var>legacy target override flag</var>, run these steps:
{{Event/cancelable}} attribute initialized to true".

<p>Or, when a custom constructor is required, "<a>fire an event</a> named <code>click</code> at
<var>target</var> using {{MouseEvent}} with its {{Event/isTrusted}} attribute initialized to
false".
<var>target</var> using {{MouseEvent}} with its {{UIEvent/detail}} attribute initialized to 1".

<p>Ocassionally the return value is important:

Expand Down

0 comments on commit 7958b25

Please sign in to comment.