Skip to content

Commit

Permalink
Convert more "queue a task" to "queue an element task"
Browse files Browse the repository at this point in the history
This finishes the links and input sections.

Part of #4980.
  • Loading branch information
dtapuska committed Mar 30, 2020
1 parent 7105bed commit c76e86c
Showing 1 changed file with 38 additions and 34 deletions.
72 changes: 38 additions & 34 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -23098,11 +23098,12 @@ document.body.appendChild(wbr);</code></pre>
<li>
<p>If that is successful, let <var>URL</var> be the <span>resulting URL string</span>.</p>

<p>Otherwise, if <span data-x="parse a url">parsing</span> the <span>URL</span> failed, the
user agent may report the error to the user in a user-agent-specific manner, may <span>queue a
task</span> to <span>navigate</span><!--DONAV hyperlink--> the <var>target</var>
<span>browsing context</span> to an error page to report the error, or may ignore the error and
do nothing. In any case, the user agent must then return.</p>
<p>Otherwise, if <span data-x="parse a url">parsing</span> the <span>URL</span> failed, the user
agent may report the error to the user in a user-agent-specific manner, may <span>queue an
element task</span> on the <span>DOM manipulation task source</span> given <var>subject</var> to
<span>navigate</span><!--DONAV hyperlink--> the <var>target</var> <span>browsing context</span>
to an error page to report the error, or may ignore the error and do nothing. In any case, the
user agent must then return.</p>
</li>

<li><p>If there is a <var>hyperlink suffix</var>, append it to <var>URL</var>.</p></li>
Expand All @@ -23117,15 +23118,13 @@ document.body.appendChild(wbr);</code></pre>
<var>request</var>'s <span data-x="concept-request-referrer">referrer</span> to "<code
data-x="">no-referrer</code>".</p></li>

<li><p><span>Queue a task</span> to <span>navigate</span><!--DONAV hyperlink--> the
<var>target</var> <span>browsing context</span> to <var>request</var>. If <var>replace</var> is
true, the navigation must be performed with <span>replacement enabled</span>. The
<span>source browsing context</span> must be <var>source</var>.</p></li>
<li><p><span>Queue an element task</span> on the <span>DOM manipulation task source</span> given
<var>subject</var> to <span>navigate</span><!--DONAV hyperlink--> the <var>target</var>
<span>browsing context</span> to <var>request</var>. If <var>replace</var> is true, the
navigation must be performed with <span>replacement enabled</span>. The <span>source browsing
context</span> must be <var>source</var>.</p></li>
</ol>

<p>The <span>task source</span> for the tasks mentioned above is the <span>DOM manipulation task
source</span>.</p>

</div>


Expand Down Expand Up @@ -46909,14 +46908,15 @@ ldh-str = &lt; as defined in <a href="https://tools.ietf.org/html/rfc1034#

<p>If the element is <i data-x="concept-fe-mutable">mutable</i>, the user agent should allow the
user to change the files on the list in other ways also, e.g. adding or removing files by
drag-and-drop. When the user does so, the user agent must <span>queue a task</span> to first
update the element's <span data-x="concept-input-type-file-selected">selected files</span> so that
it represents the user's new selection, then <span data-x="concept-event-fire">fire an
event</span> named <code data-x="event-input">input</code> at the <code>input</code> element, with
the <code data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true, and finally
<span data-x="concept-event-fire">fire an event</span> named <code
data-x="event-change">change</code> at the <code>input</code> element, with the <code
data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true.</p>
drag-and-drop. When the user does so, the user agent must <span>queue an element task</span> on
the <span>user interaction task source</span> given the <code>input</code> element to first update
the element's <span data-x="concept-input-type-file-selected">selected files</span> so that it
represents the user's new selection, then <span data-x="concept-event-fire">fire an event</span>
named <code data-x="event-input">input</code> at the <code>input</code> element, with the <code
data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true, and finally <span
data-x="concept-event-fire">fire an event</span> named <code data-x="event-change">change</code>
at the <code>input</code> element, with the <code data-x="dom-Event-bubbles">bubbles</code>
attribute initialized to true.</p>

<p>If the element is not <i data-x="concept-fe-mutable">mutable</i>, the user agent must not allow
the user to change the element's selection.</p>
Expand Down Expand Up @@ -47304,10 +47304,12 @@ ldh-str = &lt; as defined in <a href="https://tools.ietf.org/html/rfc1034#
<p>The <span data-x="concept-task">task</span> that is <span data-x="queue a task">queued</span>
by the <span>networking task source</span> once the resource has been fetched, must, if the
download was successful and the image is <i data-x="input-img-available">available</i>,
<span>queue a task</span> to <span data-x="concept-event-fire">fire an event</span> named <code
<span>queue an element task</span> on the <span>user interaction task source</span> given the
<code>input</code> element to <span data-x="concept-event-fire">fire an event</span> named <code
data-x="event-load">load</code> at the <code>input</code> element; and otherwise, if the fetching
process fails without a response from the remote server, or completes but the image is not a valid
or supported image, <span>queue a task</span> to <span data-x="concept-event-fire">fire an
or supported image, <span>queue an element task</span> on the <span>user interaction task
source</span> given the <code>input</code> element to <span data-x="concept-event-fire">fire an
event</span> named <code data-x="event-error">error</code> on the <code>input</code> element.</p>

<hr>
Expand Down Expand Up @@ -48897,10 +48899,12 @@ You cannot submit this form when the field is incorrect.</samp></pre>
to which these events <span data-x="concept-input-apply">apply</span>, and for which the user
interface involves both interactive manipulation and an explicit commit action, then when the user
changes the element's <span data-x="concept-fe-value">value</span>, the user agent must
<span>queue a task</span> to <span data-x="concept-event-fire">fire an event</span> named <code
<span>queue an element task</span> on the <span>user interaction task source</span> given the
<code>input</code> element to <span data-x="concept-event-fire">fire an event</span> named <code
data-x="event-input">input</code> at the <code>input</code> element, with the <code
data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true, and any time the user
commits the change, the user agent must <span>queue a task</span> to <span
commits the change, the user agent must <span>queue an element task</span> on the <span>user
interaction task source</span> given the <code>input</code> element to <span
data-x="concept-event-fire">fire an event</span> named <code data-x="event-change">change</code>
at the <code>input</code> element, with the <code data-x="dom-Event-bubbles">bubbles</code>
attribute initialized to true.</p>
Expand All @@ -48916,7 +48920,8 @@ You cannot submit this form when the field is incorrect.</samp></pre>
to which these events <span data-x="concept-input-apply">apply</span>, and for which the user
interface involves an explicit commit action but no intermediate manipulation, then any time the
user commits a change to the element's <span data-x="concept-fe-value">value</span>, the user
agent must <span>queue a task</span> to first <span data-x="concept-event-fire">fire an
agent must <span>queue an element task</span> on the <span>user interaction task source</span>
given the <code>input</code> element to first <span data-x="concept-event-fire">fire an
event</span> named <code data-x="event-input">input</code> at the <code>input</code> element, with
the <code data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true, and then <span
data-x="concept-event-fire">fire an event</span> named <code data-x="event-change">change</code>
Expand All @@ -48938,11 +48943,12 @@ You cannot submit this form when the field is incorrect.</samp></pre>
<p>For <code>input</code> elements without a defined <span>input activation behavior</span>, but
to which these events <span data-x="concept-input-apply">apply</span>, any time the user causes
the element's <span data-x="concept-fe-value">value</span> to change without an explicit commit
action, the user agent must <span>queue a task</span> to <span data-x="concept-event-fire">fire an
action, the user agent must <span>queue an element task</span> on the <span>user interaction task
source</span> given the <code>input</code> element to <span data-x="concept-event-fire">fire an
event</span> named <code data-x="event-input">input</code> at the <code>input</code> element, with
the <code data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true. The
corresponding <code data-x="event-change">change</code> event, if any, will be fired when
the control <a href="#unfocus-causes-change-event">loses focus</a>.</p>
corresponding <code data-x="event-change">change</code> event, if any, will be fired when the
control <a href="#unfocus-causes-change-event">loses focus</a>.</p>

<p class="example">Examples of a user changing the element's <span
data-x="concept-fe-value">value</span> would include the user typing into a text control, pasting
Expand All @@ -48957,15 +48963,16 @@ You cannot submit this form when the field is incorrect.</samp></pre>
without a commit step.</p>

<p>In the case of <span data-x="concept-task">tasks</span> that just fire an <code
data-x="event-input">input</code> event, user agents may wait for a suitable break in the
user's interaction before <span data-x="queue a task">queuing</span> the tasks; for example, a
data-x="event-input">input</code> event, user agents may wait for a suitable break in the user's
interaction before <span data-x="queue an element task">queuing</span> the tasks; for example, a
user agent could wait for the user to have not hit a key for 100ms, so as to only fire the event
when the user pauses, instead of continuously for each keystroke. <!-- similar text is present in
the <textarea> section -->

<p>When the user agent is to change an <code>input</code> element's <span
data-x="concept-fe-value">value</span> on behalf of the user (e.g. as part of a form prefilling
feature), the user agent must <span>queue a task</span> to first update the <span
feature), the user agent must <span>queue an element task</span> on the <span>user interaction
task source</span> given the <code>input</code> element to first update the <span
data-x="concept-fe-value">value</span> accordingly, then <span data-x="concept-event-fire">fire an
event</span> named <code data-x="event-input">input</code> at the <code>input</code> element, with
the <code data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true, then <span
Expand All @@ -48978,9 +48985,6 @@ You cannot submit this form when the field is incorrect.</samp></pre>
to the user manipulating the controls, without having to then filter out the script's own changes
to avoid an infinite loop.)</p>

<p>The <span>task source</span> for these <span data-x="concept-task">tasks</span> is the
<span>user interaction task source</span>.</p>

</div>


Expand Down

0 comments on commit c76e86c

Please sign in to comment.