Skip to content

Commit

Permalink
Always leave isTrusted as true when firing events
Browse files Browse the repository at this point in the history
<form>.reset() always sets isTrusted in current implementations, so we
remove the spec language that sometimes set it to false.

One cannot trigger “send select update notifications” from script, so
the spec language that sometimes sets isTrusted to false for those
events can never be triggered, and is thus be removed.

Fixes whatwg#1912.
  • Loading branch information
annevk authored and Alice Boxhall committed Jan 7, 2019
1 parent 65025bc commit 2a053b6
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -48687,20 +48687,13 @@ interface <dfn>HTMLSelectElement</dfn> : <span>HTMLElement</span> {
a task</span>, using the <span>user interaction task source</span>, to run these steps:</p>

<ol>
<li><p>Let <var>isTrusted</var> be false, if the <span>JavaScript execution context stack</span>
is not empty, and true otherwise.</p></li>

<li><p><span data-x="concept-event-fire">Fire an event</span> named <code
data-x="event-input">input</code> at the <code>select</code> element, with the <code
data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true and the <code
data-x="dom-Event-isTrusted">isTrusted</code> attribute initialized to
<var>isTrusted</var>.</p></li>
data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true.</p></li>

<li><p><span data-x="concept-event-fire">Fire an event</span> named <code
data-x="event-change">change</code> at the <code>select</code> element, with the <code
data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true and the <code
data-x="dom-Event-isTrusted">isTrusted</code> attribute initialized to
<var>isTrusted</var>.</p></li>
data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true.</p></li>
</ol>

<p>The <span data-x="concept-form-reset-control">reset algorithm</span> for <code>select</code>
Expand Down Expand Up @@ -55513,15 +55506,10 @@ fur
data-x="concept-form-reset">reset</dfn>, run these steps:</p>

<ol>
<li><p>Let <var>isTrusted</var> false, if this algorithm is invoked by the <code
data-x="dom-form-reset">reset()</code> method, and true otherwise.</p></li>

<li><p>Let <var>reset</var> be the result of <span data-x="concept-event-fire">firing an
event</span> named <code data-x="event-reset">reset</code> at <var>form</var>, with the <code
data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true, <code
data-x="dom-Event-cancelable">cancelable</code> attribute initialized to true, and <code
data-x="dom-Event-isTrusted">isTrusted</code> attribute initialized to
<var>isTrusted</var>.</p></li>
data-x="dom-Event-bubbles">bubbles</code> and <code
data-x="dom-Event-cancelable">cancelable</code> attributes initialized to true.</p></li>

<li><p>If <var>reset</var> is true, then invoke the <span
data-x="concept-form-reset-control">reset algorithm</span> of each <span
Expand Down

0 comments on commit 2a053b6

Please sign in to comment.