Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[e] (0) Some cleanup in the top parts of the spec
Affected topics: DOM APIs, HTML

git-svn-id: http://svn.whatwg.org/webapps@8532 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Mar 6, 2014
1 parent ca405b3 commit 11b8c60
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 70 deletions.
39 changes: 17 additions & 22 deletions complete.html
Expand Up @@ -3909,9 +3909,8 @@ <h4 id=dependencies><span class=secno>2.2.2 </span>Dependencies</h4>
<p>The term <dfn id=default-object-size>default object size</dfn> is also defined in the <cite>CSS Image Values and
Replaced Content</cite> specification. <a href=#refsCSSIMAGES>[CSSIMAGES]</a></p>

<!--CLEANUP-->
<p>Implementations that support scripting must support the CSS Object Model. The
following features and terms are defined in the CSSOM specifications: <a href=#refsCSSOM>[CSSOM]</a> <a href=#refsCSSOMVIEW>[CSSOMVIEW]</a>
<p>Implementations that support scripting must support the CSS Object Model. The following
features and terms are defined in the CSSOM specifications: <a href=#refsCSSOM>[CSSOM]</a> <a href=#refsCSSOMVIEW>[CSSOMVIEW]</a>

<ul class=brief><li><dfn id=screen><code>Screen</code></dfn></li>
<li><dfn id=linkstyle><code>LinkStyle</code></dfn></li>
Expand Down Expand Up @@ -7848,9 +7847,10 @@ <h5 id=htmloptionscollection-0><span class=secno>2.7.2.3 </span>HTMLOptionsColle
<code><a href=#htmloptionscollection>HTMLOptionsCollection</a></code> interface must act like the <code title=dom-HTMLCollection-namedItem>namedItem()</code> method on the ancestor
<code><a href=#htmlcollection>HTMLCollection</a></code> interface.</p>

<!--CLEANUP-->
<p>When the user agent is to <dfn id=dom-htmloptionscollection-setter title=dom-HTMLOptionsCollection-setter>set the value of a new
indexed property or set the value of an existing indexed property</dfn> for a given property index <var title="">index</var> to a new value <var title="">value</var>, it must run the following algorithm:</p>
indexed property or set the value of an existing indexed property</dfn> for a given property index
<var title="">index</var> to a new value <var title="">value</var>, it must run the following
algorithm:</p>

<ol><li><p>If <var title="">value</var> is null, invoke the steps for the <code title=dom-HTMLOptionsCollection-remove><a href=#dom-htmloptionscollection-remove>remove</a></code> method with <var title="">index</var> as
the argument, and abort these steps.</li>
Expand Down Expand Up @@ -8121,11 +8121,9 @@ <h4 id=domelementmap-0><span class=secno>2.7.4 </span>DOMElementMap</h4>

<h4 id=transferable-objects><span class=secno>2.7.5 </span>Transferable objects</h4>

<!--CLEANUP-->
<p>Some objects support being copied and closed in one operation.
This is called <i>transferring</i> the object, and is used in
particular to transfer ownership of unsharable or expensive
resources across worker boundaries.</p>
<p>Some objects support being copied and closed in one operation. This is called
<i>transferring</i> the object, and is used in particular to transfer ownership of unsharable or
expensive resources across worker boundaries.</p>

<p>The following <code><a href=#transferable>Transferable</a></code> types exist:</p>

Expand All @@ -8138,20 +8136,17 @@ <h4 id=transferable-objects><span class=secno>2.7.5 </span>Transferable objects<

<pre class=idl>typedef (<a href=#arraybuffer>ArrayBuffer</a> or <a href=#canvasproxy>CanvasProxy</a> or <a href=#messageport>MessagePort</a>) <dfn id=transferable>Transferable</dfn>;</pre>

<!--CLEANUP-->
<p>To <dfn id=transfer-a-transferable-object>transfer a <code>Transferable</code> object</dfn> to a
new owner, the user agent must run the steps defined for the type of
object in question. The steps will return a new object of the same
type, and will permanently <dfn id=concept-transferable-neutered title=concept-Transferable-neutered>neuter</dfn> the original
object. (This is an irreversible and non-idempotent operation; once
an object has been transferred, it cannot be transferred, or indeed
used, again.)</p>
<p>To <dfn id=transfer-a-transferable-object>transfer a <code>Transferable</code> object</dfn> to a new owner, the user agent must
run the steps defined for the type of object in question. The steps will return a new object of
the same type, and will permanently <dfn id=concept-transferable-neutered title=concept-Transferable-neutered>neuter</dfn> the
original object. (This is an irreversible and non-idempotent operation; once an object has been
transferred, it cannot be transferred, or indeed used, again.)</p>

<p id=transferArrayBuffer>To <a href=#transfer-a-transferable-object title="transfer a Transferable object">transfer</a> an
<code><a href=#arraybuffer>ArrayBuffer</a></code> object <var title="">old</var> to a new owner <var title="">owner</var>,
a user agent must create a new <code><a href=#arraybuffer>ArrayBuffer</a></code> object pointing at the same underlying
data as <var title="">old</var>, thus obtaining <var title="">new</var>, must <a href=#concept-transferable-neutered title=concept-Transferable-neutered>neuter</a> the <var title="">old</var> object, and must
finally return <var title="">new</var>. <a href=#refsECMA262>[ECMA262]</a></p>
<code><a href=#arraybuffer>ArrayBuffer</a></code> object <var title="">old</var> to a new owner <var title="">owner</var>, a user agent must create a new <code><a href=#arraybuffer>ArrayBuffer</a></code> object pointing at
the same underlying data as <var title="">old</var>, thus obtaining <var title="">new</var>,
must <a href=#concept-transferable-neutered title=concept-Transferable-neutered>neuter</a> the <var title="">old</var>
object, and must finally return <var title="">new</var>. <a href=#refsECMA262>[ECMA262]</a></p>
<!-- I'm expecting this section to move to the JS spec eventually so I'm leaving it as is for now -->

<p class=note>Rules for how to <a href=#transferCanvasProxy>transfer a
Expand Down
39 changes: 17 additions & 22 deletions index
Expand Up @@ -3909,9 +3909,8 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<p>The term <dfn id=default-object-size>default object size</dfn> is also defined in the <cite>CSS Image Values and
Replaced Content</cite> specification. <a href=#refsCSSIMAGES>[CSSIMAGES]</a></p>

<!--CLEANUP-->
<p>Implementations that support scripting must support the CSS Object Model. The
following features and terms are defined in the CSSOM specifications: <a href=#refsCSSOM>[CSSOM]</a> <a href=#refsCSSOMVIEW>[CSSOMVIEW]</a>
<p>Implementations that support scripting must support the CSS Object Model. The following
features and terms are defined in the CSSOM specifications: <a href=#refsCSSOM>[CSSOM]</a> <a href=#refsCSSOMVIEW>[CSSOMVIEW]</a>

<ul class=brief><li><dfn id=screen><code>Screen</code></dfn></li>
<li><dfn id=linkstyle><code>LinkStyle</code></dfn></li>
Expand Down Expand Up @@ -7848,9 +7847,10 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..
<code><a href=#htmloptionscollection>HTMLOptionsCollection</a></code> interface must act like the <code title=dom-HTMLCollection-namedItem>namedItem()</code> method on the ancestor
<code><a href=#htmlcollection>HTMLCollection</a></code> interface.</p>

<!--CLEANUP-->
<p>When the user agent is to <dfn id=dom-htmloptionscollection-setter title=dom-HTMLOptionsCollection-setter>set the value of a new
indexed property or set the value of an existing indexed property</dfn> for a given property index <var title="">index</var> to a new value <var title="">value</var>, it must run the following algorithm:</p>
indexed property or set the value of an existing indexed property</dfn> for a given property index
<var title="">index</var> to a new value <var title="">value</var>, it must run the following
algorithm:</p>

<ol><li><p>If <var title="">value</var> is null, invoke the steps for the <code title=dom-HTMLOptionsCollection-remove><a href=#dom-htmloptionscollection-remove>remove</a></code> method with <var title="">index</var> as
the argument, and abort these steps.</li>
Expand Down Expand Up @@ -8121,11 +8121,9 @@ interface <dfn id=domstringmap>DOMStringMap</dfn> {

<h4 id=transferable-objects><span class=secno>2.7.5 </span>Transferable objects</h4>

<!--CLEANUP-->
<p>Some objects support being copied and closed in one operation.
This is called <i>transferring</i> the object, and is used in
particular to transfer ownership of unsharable or expensive
resources across worker boundaries.</p>
<p>Some objects support being copied and closed in one operation. This is called
<i>transferring</i> the object, and is used in particular to transfer ownership of unsharable or
expensive resources across worker boundaries.</p>

<p>The following <code><a href=#transferable>Transferable</a></code> types exist:</p>

Expand All @@ -8138,20 +8136,17 @@ interface <dfn id=domstringmap>DOMStringMap</dfn> {

<pre class=idl>typedef (<a href=#arraybuffer>ArrayBuffer</a> or <a href=#canvasproxy>CanvasProxy</a> or <a href=#messageport>MessagePort</a>) <dfn id=transferable>Transferable</dfn>;</pre>

<!--CLEANUP-->
<p>To <dfn id=transfer-a-transferable-object>transfer a <code>Transferable</code> object</dfn> to a
new owner, the user agent must run the steps defined for the type of
object in question. The steps will return a new object of the same
type, and will permanently <dfn id=concept-transferable-neutered title=concept-Transferable-neutered>neuter</dfn> the original
object. (This is an irreversible and non-idempotent operation; once
an object has been transferred, it cannot be transferred, or indeed
used, again.)</p>
<p>To <dfn id=transfer-a-transferable-object>transfer a <code>Transferable</code> object</dfn> to a new owner, the user agent must
run the steps defined for the type of object in question. The steps will return a new object of
the same type, and will permanently <dfn id=concept-transferable-neutered title=concept-Transferable-neutered>neuter</dfn> the
original object. (This is an irreversible and non-idempotent operation; once an object has been
transferred, it cannot be transferred, or indeed used, again.)</p>

<p id=transferArrayBuffer>To <a href=#transfer-a-transferable-object title="transfer a Transferable object">transfer</a> an
<code><a href=#arraybuffer>ArrayBuffer</a></code> object <var title="">old</var> to a new owner <var title="">owner</var>,
a user agent must create a new <code><a href=#arraybuffer>ArrayBuffer</a></code> object pointing at the same underlying
data as <var title="">old</var>, thus obtaining <var title="">new</var>, must <a href=#concept-transferable-neutered title=concept-Transferable-neutered>neuter</a> the <var title="">old</var> object, and must
finally return <var title="">new</var>. <a href=#refsECMA262>[ECMA262]</a></p>
<code><a href=#arraybuffer>ArrayBuffer</a></code> object <var title="">old</var> to a new owner <var title="">owner</var>, a user agent must create a new <code><a href=#arraybuffer>ArrayBuffer</a></code> object pointing at
the same underlying data as <var title="">old</var>, thus obtaining <var title="">new</var>,
must <a href=#concept-transferable-neutered title=concept-Transferable-neutered>neuter</a> the <var title="">old</var>
object, and must finally return <var title="">new</var>. <a href=#refsECMA262>[ECMA262]</a></p>
<!-- I'm expecting this section to move to the JS spec eventually so I'm leaving it as is for now -->

<p class=note>Rules for how to <a href=#transferCanvasProxy>transfer a
Expand Down
45 changes: 19 additions & 26 deletions source
Expand Up @@ -2659,10 +2659,9 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<p>The term <dfn>default object size</dfn> is also defined in the <cite>CSS Image Values and
Replaced Content</cite> specification. <a href="#refsCSSIMAGES">[CSSIMAGES]</a></p>

<!--CLEANUP-->
<p>Implementations that support scripting must support the CSS Object Model. The
following features and terms are defined in the CSSOM specifications: <a
href="#refsCSSOM">[CSSOM]</a> <a href="#refsCSSOMVIEW">[CSSOMVIEW]</a>
<p>Implementations that support scripting must support the CSS Object Model. The following
features and terms are defined in the CSSOM specifications: <a href="#refsCSSOM">[CSSOM]</a> <a
href="#refsCSSOMVIEW">[CSSOMVIEW]</a>

<ul class="brief">
<li><dfn><code>Screen</code></dfn></li>
Expand Down Expand Up @@ -7358,10 +7357,10 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..
data-x="dom-HTMLCollection-namedItem">namedItem()</code> method on the ancestor
<code>HTMLCollection</code> interface.</p>

<!--CLEANUP-->
<p>When the user agent is to <dfn data-x="dom-HTMLOptionsCollection-setter">set the value of a new
indexed property or set the value of an existing indexed property</dfn> for a given property index <var data-x="">index</var> to a new value <var
data-x="">value</var>, it must run the following algorithm:</p>
indexed property or set the value of an existing indexed property</dfn> for a given property index
<var data-x="">index</var> to a new value <var data-x="">value</var>, it must run the following
algorithm:</p>

<ol>

Expand Down Expand Up @@ -7670,11 +7669,9 @@ interface <dfn>DOMStringMap</dfn> {

<h4>Transferable objects</h4>

<!--CLEANUP-->
<p>Some objects support being copied and closed in one operation.
This is called <i>transferring</i> the object, and is used in
particular to transfer ownership of unsharable or expensive
resources across worker boundaries.</p>
<p>Some objects support being copied and closed in one operation. This is called
<i>transferring</i> the object, and is used in particular to transfer ownership of unsharable or
expensive resources across worker boundaries.</p>

<p>The following <code>Transferable</code> types exist:</p>

Expand All @@ -7690,22 +7687,18 @@ interface <dfn>DOMStringMap</dfn> {

<pre class="idl">typedef (<span>ArrayBuffer</span> or <span>CanvasProxy</span> or <span>MessagePort</span>) <dfn>Transferable</dfn>;</pre>

<!--CLEANUP-->
<p>To <dfn>transfer a <code>Transferable</code> object</dfn> to a
new owner, the user agent must run the steps defined for the type of
object in question. The steps will return a new object of the same
type, and will permanently <dfn
data-x="concept-Transferable-neutered">neuter</dfn> the original
object. (This is an irreversible and non-idempotent operation; once
an object has been transferred, it cannot be transferred, or indeed
used, again.)</p>
<p>To <dfn>transfer a <code>Transferable</code> object</dfn> to a new owner, the user agent must
run the steps defined for the type of object in question. The steps will return a new object of
the same type, and will permanently <dfn data-x="concept-Transferable-neutered">neuter</dfn> the
original object. (This is an irreversible and non-idempotent operation; once an object has been
transferred, it cannot be transferred, or indeed used, again.)</p>

<p id="transferArrayBuffer">To <span data-x="transfer a Transferable object">transfer</span> an
<code>ArrayBuffer</code> object <var data-x="">old</var> to a new owner <var data-x="">owner</var>,
a user agent must create a new <code>ArrayBuffer</code> object pointing at the same underlying
data as <var data-x="">old</var>, thus obtaining <var data-x="">new</var>, must <span
data-x="concept-Transferable-neutered">neuter</span> the <var data-x="">old</var> object, and must
finally return <var data-x="">new</var>. <a href="#refsECMA262">[ECMA262]</a></p>
<code>ArrayBuffer</code> object <var data-x="">old</var> to a new owner <var
data-x="">owner</var>, a user agent must create a new <code>ArrayBuffer</code> object pointing at
the same underlying data as <var data-x="">old</var>, thus obtaining <var data-x="">new</var>,
must <span data-x="concept-Transferable-neutered">neuter</span> the <var data-x="">old</var>
object, and must finally return <var data-x="">new</var>. <a href="#refsECMA262">[ECMA262]</a></p>
<!-- I'm expecting this section to move to the JS spec eventually so I'm leaving it as is for now -->

<p class="note">Rules for how to <a href="#transferCanvasProxy">transfer a
Expand Down

0 comments on commit 11b8c60

Please sign in to comment.