Skip to content

Commit

Permalink
Editorial: minor cleanup
Browse files Browse the repository at this point in the history
Use "the context object" and "when invoked" more consistently.
  • Loading branch information
annevk committed Apr 9, 2018
1 parent e36b369 commit 7a7f7f3
Showing 1 changed file with 36 additions and 37 deletions.
73 changes: 36 additions & 37 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -579,11 +579,11 @@ the empty list.</p>
initialized to. When an <a>event</a> is created the attribute must be initialized to the empty
string.

<p>The <dfn attribute for=Event><code>target</code></dfn> attribute's getter must return the
<a>context object</a>'s <a for=Event>target</a>.
<p>The <dfn attribute for=Event><code>target</code></dfn> attribute's getter, when invoked, must
return the <a>context object</a>'s <a for=Event>target</a>.

<p>The <dfn attribute for=Event><code>srcElement</code></dfn> attribute's getter must return the
<a>context object</a>'s <a for=Event>target</a>.
<p>The <dfn attribute for=Event><code>srcElement</code></dfn> attribute's getter, when invoked, must
return the <a>context object</a>'s <a for=Event>target</a>.

<p>The <dfn attribute for=Event><code>currentTarget</code></dfn> attribute must return the value it
was initialized to. When an <a>event</a> is created the attribute must be initialized to null.
Expand All @@ -598,10 +598,10 @@ steps:

<li><p>Let <var>hasSeenCurrentTarget</var> be false.

<li><p>Let <var>currentTarget</var> be <a>context object</a>'s {{Event/currentTarget}}
<li><p>Let <var>currentTarget</var> be the <a>context object</a>'s {{Event/currentTarget}}
attribute value.

<li><p>Let <var>reversedPath</var> be <a>context object</a>'s <a for=Event>path</a>, in reverse
<li><p>Let <var>reversedPath</var> be the <a>context object</a>'s <a for=Event>path</a>, in reverse
order.

<li>
Expand Down Expand Up @@ -666,19 +666,20 @@ initialized to, which must be one of the following:
<p>The <dfn method for=Event><code>stopPropagation()</code></dfn> method, when invoked, must set the
<a>context object</a>'s <a>stop propagation flag</a>.</p>

<p>The <dfn attribute for=Event><code>cancelBubble</code></dfn> attribute's getter must return true
if <a>context object</a>'s <a>stop propagation flag</a> is set, and false otherwise.
<p>The <dfn attribute for=Event><code>cancelBubble</code></dfn> attribute's getter, when invoked,
must return true if the <a>context object</a>'s <a>stop propagation flag</a> is set, and false
otherwise.

<p>The {{Event/cancelBubble}} attribute's setter must set <a>context object</a>'s
<p>The {{Event/cancelBubble}} attribute's setter, when invoked, must set the <a>context object</a>'s
<a>stop propagation flag</a> if the given value is true, and do nothing otherwise.

<p>The <dfn method for=Event><code>stopImmediatePropagation()</code></dfn> method, when invoked,
must set <a>context object</a>'s <a>stop propagation flag</a> and <a>context object</a>'s
must set the <a>context object</a>'s <a>stop propagation flag</a> and the <a>context object</a>'s
<a>stop immediate propagation flag</a>.</p>

The <dfn attribute for=Event><code>bubbles</code></dfn> and
<dfn attribute for=Event><code>cancelable</code></dfn> attributes
must return the values they were initialized to.
<p>The <dfn attribute for=Event><code>bubbles</code></dfn> and
<dfn attribute for=Event><code>cancelable</code></dfn> attributes must return the values they were
initialized to.

<p>To <dfn>set the canceled flag</dfn>, given an <a>event</a> <var>event</var>, if
<var>event</var>'s {{Event/cancelable}} attribute value is true and <var>event</var>'s
Expand All @@ -698,26 +699,25 @@ with the <a>context object</a> if the given value is false, and do nothing other
effect. User agents are encouraged to log the precise cause in a developer console, to aid
debugging.

<p>The <dfn attribute for=Event><code>defaultPrevented</code></dfn> attribute's getter must return
true if <a>context object</a>'s <a>canceled flag</a> is set, and false otherwise.</p>
<p>The <dfn attribute for=Event><code>defaultPrevented</code></dfn> attribute's getter, when
invoked, must return true if the <a>context object</a>'s <a>canceled flag</a> is set, and false
otherwise.</p>

<p>The <dfn attribute for=Event><code>composed</code></dfn> attribute's getter must return true if
<a>context object</a>'s <a>composed flag</a> is set, and false otherwise.</p>
<p>The <dfn attribute for=Event><code>composed</code></dfn> attribute's getter, when invoked, must
return true if the <a>context object</a>'s <a>composed flag</a> is set, and false otherwise.</p>

<hr>

<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>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
<p>The <dfn attribute for=Event><code>timeStamp</code></dfn> attribute must return the value it was
initialized to.

<hr>
Expand Down Expand Up @@ -790,22 +790,20 @@ dictionary CustomEventInit : EventInit {
<!-- initCustomEvent is dead -->
</dl>

The <dfn attribute for=CustomEvent><code>detail</code></dfn> attribute
must return the value it was initialized to.
<p>The <dfn attribute for=CustomEvent><code>detail</code></dfn> attribute must return the value it
was initialized to.

The
<p>The
<dfn method for=CustomEvent><code>initCustomEvent(<var>type</var>, <var>bubbles</var>, <var>cancelable</var>, <var>detail</var>)</code></dfn>
method must, when invoked, run these steps:

<ol>
<li>If <a>context object</a>'s <a>dispatch flag</a> is set, then return.
<li><p>If the <a>context object</a>'s <a>dispatch flag</a> is set, then return.

<li><a>Initialize</a> the
<a>context object</a> with <var>type</var>, <var>bubbles</var>, and
<li><p><a>Initialize</a> the <a>context object</a> with <var>type</var>, <var>bubbles</var>, and
<var>cancelable</var>.

<li>Set <a>context object</a>'s {{CustomEvent/detail}}
attribute to <var>detail</var>.
<li><p>Set the <a>context object</a>'s {{CustomEvent/detail}} attribute to <var>detail</var>.
</ol>


Expand Down Expand Up @@ -1138,7 +1136,7 @@ invoked, must run these steps:

<li><p>Initialize <var>event</var>'s {{Event/isTrusted}} attribute to false.

<li><p>Return the result of <a>dispatching</a> <var>event</var> to <a>context object</a>.
<li><p>Return the result of <a>dispatching</a> <var>event</var> to the <a>context object</a>.
</ol>


Expand Down Expand Up @@ -1652,11 +1650,12 @@ invoked, must run these steps:
<li><p>Return <var>controller</var>.
</ol>

<p>The <dfn attribute for=AbortController><code>signal</code></dfn> attribute's getter must return
<a>context object</a>'s <a for=AbortController>signal</a>.
<p>The <dfn attribute for=AbortController><code>signal</code></dfn> attribute's getter, when
invoked, must return the <a>context object</a>'s <a for=AbortController>signal</a>.

<p>The <dfn method for=AbortController><code>abort()</code></dfn> method, when invoked, must
<a for=AbortSignal>signal abort</a> on <a>context object</a>'s <a for=AbortController>signal</a>.
<a for=AbortSignal>signal abort</a> on the <a>context object</a>'s
<a for=AbortController>signal</a>.


<h3 id=interface-AbortSignal>Interface {{AbortSignal}}</h3>
Expand Down Expand Up @@ -1701,8 +1700,8 @@ requirements to react in a reasonable way to {{AbortController/abort()}}. For ex
[=AbortSignal/aborted flag=] might need to be propagated to a cross-thread environment, such as a
service worker.

<p>The <dfn attribute for=AbortSignal>aborted</dfn> attribute's getter must return true if
<a>context object</a>'s [=AbortSignal/aborted flag=] is set, and false otherwise.
<p>The <dfn attribute for=AbortSignal>aborted</dfn> attribute's getter, when invoked, must return
true if the <a>context object</a>'s [=AbortSignal/aborted flag=] is set, and false otherwise.

<p class=note>Changes to an {{AbortSignal}} object represent the wishes of the corresponding
{{AbortController}} object, but an API observing the {{AbortSignal}} object can chose to ignore
Expand Down Expand Up @@ -2664,7 +2663,7 @@ DocumentFragment includes NonElementParentNode;
</dl>

<p>The <dfn method for=NonElementParentNode><code>getElementById(<var>elementId</var>)</code></dfn>
method, when invoked, must return the first <a for="/">element</a>, in <a>tree order</a>, within
method, when invoked, must return the first <a for="/">element</a>, in <a>tree order</a>, within the
<a>context object</a>'s <a>descendants</a>, whose <a for=Element>ID</a> is <var>elementId</var>, and
null if there is no such <a for="/">element</a> otherwise.

Expand Down

0 comments on commit 7a7f7f3

Please sign in to comment.