Skip to content

Commit

Permalink
Editorial: cleanup for NamedNodeMap/Attr/CharacterData
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Mar 30, 2016
1 parent 5790d72 commit 6b06d0b
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 93 deletions.
109 changes: 45 additions & 64 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -6005,21 +6005,17 @@ range zero to the number of <a>attributes</a> in its
<a for=NamedNodeMap>attribute list</a> is empty, in which case
there are no <a>supported property indices</a>.

The <dfn attribute for="NamedNodeMap">length</dfn> attribute's getter
must return the number of <a>attributes</a> in the
<a for=NamedNodeMap>attribute list</a>.
<p>The <dfn attribute for="NamedNodeMap"><code>length</code></dfn> attribute's getter must return
the number of <a>attributes</a> in the <a for=NamedNodeMap>attribute list</a>.

The
<dfn method for="NamedNodeMap">item(<var>index</var>)</dfn> method,
when invoked, must run these steps:
<p>The <dfn method for="NamedNodeMap"><code>item(<var>index</var>)</code></dfn> method, when
invoked, must run these steps:

<ol>
<li>If <var>index</var> is equal to or greater than the number of
<a>attributes</a> in the
<li><p>If <var>index</var> is equal to or greater than the number of <a>attributes</a> in the
<a for=NamedNodeMap>attribute list</a>, return null.

<li>Otherwise, return the <var>index</var>th
<a>attribute</a> in the
<li><p>Otherwise, return the <var>index</var>th <a>attribute</a> in the
<a for=NamedNodeMap>attribute list</a>.
</ol>

Expand Down Expand Up @@ -6049,23 +6045,23 @@ steps:
<li><p>Return <var>names</var>.
</ol>

The <dfn method for="NamedNodeMap"><code>getNamedItem(<var>qualifiedName</var>)</code></dfn>
<p>The <dfn method for="NamedNodeMap"><code>getNamedItem(<var>qualifiedName</var>)</code></dfn>
method, when invoked, must return the result of
<a lt="get an attribute by name">getting an attribute</a> given <var>qualifiedName</var> and
<a for=NamedNodeMap>element</a>.

The
<dfn method for="NamedNodeMap">getNamedItemNS(<var>namespace</var>, <var>localName</var>)</dfn>
<p>The
<dfn method for="NamedNodeMap"><code>getNamedItemNS(<var>namespace</var>, <var>localName</var>)</code></dfn>
method, when invoked, must return the result of
<a lt="get an attribute by namespace and local name">getting an attribute</a> given
<var>namespace</var>, <var>localName</var>, and
<a for=NamedNodeMap>element</a>.

The <dfn method for="NamedNodeMap"><code>setNamedItem(<var>attr</var>)</code></dfn> and
<p>The <dfn method for="NamedNodeMap"><code>setNamedItem(<var>attr</var>)</code></dfn> and
<dfn method for="NamedNodeMap"><code>setNamedItemNS(<var>attr</var>)</code></dfn>
methods, when invoked, must return the result of <a lt="set an attribute">setting an attribute</a> given <var>attr</var> and <a for=NamedNodeMap>element</a>. Rethrow any exceptions.

The <dfn method for="NamedNodeMap"><code>removeNamedItem(<var>qualifiedName</var>)</code></dfn>
<p>The <dfn method for="NamedNodeMap"><code>removeNamedItem(<var>qualifiedName</var>)</code></dfn>
method, when invoked, must run these steps:

<ol>
Expand All @@ -6079,20 +6075,18 @@ method, when invoked, must run these steps:
<li><p>Return <var>attr</var>.
</ol>

The
<dfn method for="NamedNodeMap">removeNamedItemNS(<var>namespace</var>, <var>localName</var>)</dfn>
<p>The
<dfn method for="NamedNodeMap"><code>removeNamedItemNS(<var>namespace</var>, <var>localName</var>)</code></dfn>
method, when invoked, must run these steps:

<ol>
<li>Let <var>attr</var> be the result of
<a lt="remove an attribute by namespace and local name">removing an attribute</a>
given <var>namespace</var>, <var>localName</var>, and
<a for=NamedNodeMap>element</a>.
<li><p>Let <var>attr</var> be the result of
<a lt="remove an attribute by namespace and local name">removing an attribute</a> given
<var>namespace</var>, <var>localName</var>, and <a for=NamedNodeMap>element</a>.

<li>If <var>attr</var> is null, <a>throw</a> a
{{NotFoundError}} exception.
<li><p>If <var>attr</var> is null, <a>throw</a> a {{NotFoundError}} exception.

<li>Return <var>attr</var>.
<li><p>Return <var>attr</var>.
</ol>


Expand Down Expand Up @@ -6194,13 +6188,12 @@ handling is required.

<hr>

The <dfn attribute for="Attr">ownerElement</dfn> attribute's getter
must return the <a for=Attr>element</a>.
<p>The <dfn attribute for="Attr"><code>ownerElement</code></dfn> attribute's getter must return
<a>context object</a>'s <a for=Attr>element</a>.

<hr>

The <dfn attribute for="Attr">specified</dfn> attribute's getter must
return true.
<p>The <dfn attribute for="Attr"><code>specified</code></dfn> attribute's getter must return true.


<h3 id='interface-characterdata'>Interface {{CharacterData}}</h3>
Expand Down Expand Up @@ -6353,48 +6346,36 @@ To <dfn export for="CharacterData, Text, Comment, ProcessingInstruction" id=conc
<a>data</a>.
</ol>

The <dfn attribute for="CharacterData">data</dfn> attribute
must return <a>data</a>, and on setting, must
<a>replace data</a> with node
<a>context object</a> offset 0, count
{{CharacterData/length}} attribute value, and data
new value.
<p>The <dfn attribute for="CharacterData"><code>data</code></dfn> attribute's getter must return
<a>context object</a>'s <a>data</a>. Its setter must <a>replace data</a> with node
<a>context object</a> offset 0, count {{CharacterData/length}} attribute value, and data new value.

The <dfn attribute for="CharacterData">length</dfn>
attribute must return the number of
<a>code units</a> in
<a>data</a>.
<p>The <dfn attribute for="CharacterData"><code>length</code></dfn> attribute's getter must return
the number of <a>code units</a> in <a>context object</a>'s <a>data</a>.

The
<dfn method for="CharacterData">substringData(<var>offset</var>, <var>count</var>)</dfn>
method must <a>substring data</a> with node
<a>context object</a>, offset <var>offset</var>, and count
<var>count</var>.
<p>The
<dfn method for="CharacterData"><code>substringData(<var>offset</var>, <var>count</var>)</code></dfn>
method, when invoked, must return the result of running <a>substring data</a> with node
<a>context object</a>, offset <var>offset</var>, and count <var>count</var>.

The
<dfn method for="CharacterData">appendData(<var>data</var>)</dfn>
method must <a>replace data</a> with node
<a>context object</a>, offset
{{CharacterData/length}} attribute value, count 0,
and data <var>data</var>.
<p>The <dfn method for="CharacterData"><code>appendData(<var>data</var>)</code></dfn> method, when
invoked, must <a>replace data</a> with node <a>context object</a>, offset {{CharacterData/length}}
attribute value, count 0, and data <var>data</var>.

The
<dfn method for="CharacterData">insertData(<var>offset</var>, <var>data</var>)</dfn>
method must <a>replace data</a> with node
<a>context object</a>, offset <var>offset</var>, count 0, and
data <var>data</var>.
<p>The
<dfn method for="CharacterData"><code>insertData(<var>offset</var>, <var>data</var>)</code></dfn>
method, when invoked, must <a>replace data</a> with node <a>context object</a>, offset
<var>offset</var>, count 0, and data <var>data</var>.

The
<dfn method for="CharacterData">deleteData(<var>offset</var>, <var>count</var>)</dfn>
method must <a>replace data</a> with node
<a>context object</a>, offset <var>offset</var>, count
<var>count</var>, and data the empty string.
<p>The
<dfn method for="CharacterData"><code>deleteData(<var>offset</var>, <var>count</var>)</code></dfn>
method, when invoked, must <a>replace data</a> with node <a>context object</a>, offset
<var>offset</var>, count <var>count</var>, and data the empty string.

The
<dfn method for="CharacterData">replaceData(<var>offset</var>, <var>count</var>, <var>data</var>)</dfn>
method must <a>replace data</a> with node
<a>context object</a>, offset <var>offset</var>, count
<var>count</var>, and data <var>data</var>.
<p>The
<dfn method for="CharacterData"><code>replaceData(<var>offset</var>, <var>count</var>, <var>data</var>)</code></dfn>
method, when invoked, must <a>replace data</a> with node <a>context object</a>, offset
<var>offset</var>, count <var>count</var>, and data <var>data</var>.


<h3 id='interface-text'>Interface {{Text}}</h3>
Expand Down
Loading

0 comments on commit 6b06d0b

Please sign in to comment.