Skip to content

Commit

Permalink
Meta: disambiguate focus() and blur() for Window and HTMLElement
Browse files Browse the repository at this point in the history
Add data-dfn-for="" attributes as appropriate. This should help other
specs (in this case CSSOM View) cross-referencing these terms.

Also fixes a few cases where data-for="" should have been
data-dfn-for="".
  • Loading branch information
zcorpan authored and domenic committed Oct 20, 2017
1 parent 7f052f2 commit fde9931
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions source
Expand Up @@ -73695,17 +73695,17 @@ END:VCARD</pre>
<code>Document</code> object, when invoked, must return the result of running the <span>has focus
steps</span> with the <code>Document</code> object as the argument.</p>

<p>The <dfn><code data-x="dom-window-focus">focus()</code></dfn> method on the <code>Window</code>
object, when invoked, must run the <span>focusing steps</span> with the <code>Window</code>
object's <span>browsing context</span>. Additionally, if this <span>browsing context</span> is a
<span>top-level browsing context</span>, user agents are encouraged to trigger some sort of
notification to indicate to the user that the page is attempting to gain focus.</p>

<p>The <dfn><code data-x="dom-window-blur">blur()</code></dfn> method on the <code>Window</code>
object, when invoked, provides a hint to the user agent that the script believes the user probably
is not currently interested in the contents of the <span>browsing context</span> of the
<code>Window</code> object on which the method was invoked, but that the contents might become
interesting again in the future.</p>
<p>The <dfn data-dfn-for="Window"><code data-x="dom-window-focus">focus()</code></dfn> method on
the <code>Window</code> object, when invoked, must run the <span>focusing steps</span> with the
<code>Window</code> object's <span>browsing context</span>. Additionally, if this <span>browsing
context</span> is a <span>top-level browsing context</span>, user agents are encouraged to trigger
some sort of notification to indicate to the user that the page is attempting to gain focus.</p>

<p>The <dfn data-dfn-for="Window"><code data-x="dom-window-blur">blur()</code></dfn> method on the
<code>Window</code> object, when invoked, provides a hint to the user agent that the script
believes the user probably is not currently interested in the contents of the <span>browsing
context</span> of the <code>Window</code> object on which the method was invoked, but that the
contents might become interesting again in the future.</p>

<p>User agents are encouraged to ignore calls to this <code data-x="dom-window-blur">blur()</code>
method entirely.</p>
Expand All @@ -73715,8 +73715,8 @@ END:VCARD</pre>
system widget (e.g. tab or window) that contained the <span>browsing context</span>, but hostile
sites widely abuse this behavior to the user's detriment.</p>

<p>The <dfn><code data-x="dom-focus">focus()</code></dfn> method on elements, when invoked, must
run the following algorithm:</p>
<p>The <dfn data-dfn-for="HTMLElement"><code data-x="dom-focus">focus()</code></dfn> method on
elements, when invoked, must run the following algorithm:</p>

<ol>

Expand All @@ -73730,9 +73730,10 @@ END:VCARD</pre>

</ol>

<p>The <dfn><code data-x="dom-blur">blur()</code></dfn> method, when invoked, should run the
<span>unfocusing steps</span> for the element on which the method was called. User agents may
selectively or uniformly ignore calls to this method for usability reasons.</p>
<p>The <dfn data-dfn-for="HTMLElement"><code data-x="dom-blur">blur()</code></dfn> method, when
invoked, should run the <span>unfocusing steps</span> for the element on which the method was
called. User agents may selectively or uniformly ignore calls to this method for usability
reasons.</p>

<p class="example">For example, if the <code data-x="dom-blur">blur()</code> method is unwisely
being used to remove the focus ring for aesthetics reasons, the page would become unusable by
Expand Down Expand Up @@ -93490,7 +93491,7 @@ dictionary <dfn>EventSourceInit</dfn> {
<p>Each <code>EventSource</code> object has the following associated with it:</p>

<ul>
<li><p>A <dfn data-x="concept-EventSource-url" data-for="EventSource">url</dfn> (a <span>URL
<li><p>A <dfn data-x="concept-EventSource-url" data-dfn-for="EventSource">url</dfn> (a <span>URL
record</span>). Set during construction.</p></li>

<li><p>A <dfn data-x="concept-event-stream-request">request</dfn>. This must initially be
Expand Down Expand Up @@ -96518,15 +96519,15 @@ interface <dfn>WorkerGlobalScope</dfn> : <span>EventTarget</span> {
<div w-nodev>

<p id="the-worker's-documents">A <code>WorkerGlobalScope</code> object has an associated <dfn
id="concept-WorkerGlobalScope-owner-set" data-export="" data-for="WorkerGlobalScope">owner
id="concept-WorkerGlobalScope-owner-set" data-export="" data-dfn-for="WorkerGlobalScope">owner
set</dfn> (a <span>set</span> of <code>Document</code> and <code>WorkerGlobalScope</code>
objects). It is initially empty and populated when the worker is created or obtained.</p>

<p class="note">It is a <span>set</span>, instead of a single owner, to accomodate
<code>SharedWorkerGlobalScope</code> objects.</p>

<p>A <code>WorkerGlobalScope</code> object has an associated <dfn id="the-worker's-workers"
data-export="" data-for="WorkerGlobalScope">worker set</dfn> (a <span>set</span> of
data-export="" data-dfn-for="WorkerGlobalScope">worker set</dfn> (a <span>set</span> of
<code>WorkerGlobalScope</code> objects). It is initially empty and populated when the worker
creates or obtains further workers.</p>

Expand Down

0 comments on commit fde9931

Please sign in to comment.