[html5] r1394 - /

whatwg at whatwg.org whatwg at whatwg.org
Sun Mar 23 11:53:43 PDT 2008


Author: ianh
Date: 2008-03-23 11:53:42 -0700 (Sun, 23 Mar 2008)
New Revision: 1394

Modified:
   index
   source
Log:
[giow] (2) Redefine some table accessors to handle error conditions better.

Modified: index
===================================================================
--- index	2008-03-23 18:38:30 UTC (rev 1393)
+++ index	2008-03-23 18:53:42 UTC (rev 1394)
@@ -19285,8 +19285,9 @@
   <p>The <dfn id=caption title=dom-table-caption><code>caption</code></dfn>
    DOM attribute must return, on getting, the first <code><a
    href="#caption0">caption</a></code> element child of the <code><a
-   href="#table">table</a></code> element. On setting, if the new value is a
-   <code><a href="#caption0">caption</a></code> element, the first <code><a
+   href="#table">table</a></code> element, if any, or null otherwise. On
+   setting, if the new value is a <code><a
+   href="#caption0">caption</a></code> element, the first <code><a
    href="#caption0">caption</a></code> element child of the <code><a
    href="#table">table</a></code> element, if any, must be removed, and the
    new value must be inserted as the first node of the <code><a
@@ -19310,15 +19311,15 @@
   <p>The <dfn id=thead title=dom-table-tHead><code>tHead</code></dfn> DOM
    attribute must return, on getting, the first <code><a
    href="#thead0">thead</a></code> element child of the <code><a
-   href="#table">table</a></code> element. On setting, if the new value is a
-   <code><a href="#thead0">thead</a></code> element, the first <code><a
-   href="#thead0">thead</a></code> element child of the <code><a
-   href="#table">table</a></code> element, if any, must be removed, and the
-   new value must be inserted immediately before the first element in the
-   <code><a href="#table">table</a></code> element that is neither a <code><a
-   href="#caption0">caption</a></code> element nor a <code><a
-   href="#colgroup">colgroup</a></code> element, if any, or at the end of the
-   table otherwise. If the new value is not a <code><a
+   href="#table">table</a></code> element, if any, or null otherwise. On
+   setting, if the new value is a <code><a href="#thead0">thead</a></code>
+   element, the first <code><a href="#thead0">thead</a></code> element child
+   of the <code><a href="#table">table</a></code> element, if any, must be
+   removed, and the new value must be inserted immediately before the first
+   element in the <code><a href="#table">table</a></code> element that is
+   neither a <code><a href="#caption0">caption</a></code> element nor a
+   <code><a href="#colgroup">colgroup</a></code> element, if any, or at the
+   end of the table otherwise. If the new value is not a <code><a
    href="#thead0">thead</a></code> element, then a
    <code>HIERARCHY_REQUEST_ERR</code> DOM exception must be raised instead.
 
@@ -19341,13 +19342,13 @@
   <p>The <dfn id=tfoot title=dom-table-tFoot><code>tFoot</code></dfn> DOM
    attribute must return, on getting, the first <code><a
    href="#tfoot0">tfoot</a></code> element child of the <code><a
-   href="#table">table</a></code> element. On setting, if the new value is a
-   <code><a href="#tfoot0">tfoot</a></code> element, the first <code><a
-   href="#tfoot0">tfoot</a></code> element child of the <code><a
-   href="#table">table</a></code> element, if any, must be removed, and the
-   new value must be inserted immediately before the first element in the
-   <code><a href="#table">table</a></code> element that is neither a <code><a
-   href="#caption0">caption</a></code> element, a <code><a
+   href="#table">table</a></code> element, if any, or null otherwise. On
+   setting, if the new value is a <code><a href="#tfoot0">tfoot</a></code>
+   element, the first <code><a href="#tfoot0">tfoot</a></code> element child
+   of the <code><a href="#table">table</a></code> element, if any, must be
+   removed, and the new value must be inserted immediately before the first
+   element in the <code><a href="#table">table</a></code> element that is
+   neither a <code><a href="#caption0">caption</a></code> element, a <code><a
    href="#colgroup">colgroup</a></code> element, nor a <code><a
    href="#thead0">thead</a></code> element, if any, or at the end of the
    table if there are no such elements. If the new value is not a <code><a
@@ -19857,7 +19858,7 @@
    <code><a href="#table">table</a></code> element's <code
    title=dom-table-rows><a href="#rows">rows</a></code> collection. If there
    is no such <code><a href="#table">table</a></code> element, then the
-   attribute must return 0.
+   attribute must return &#x2212;1.
 
   <p>The <dfn id=sectionrowindex
    title=dom-tr-sectionRowIndex><code>sectionRowIndex</code></dfn> attribute
@@ -19870,7 +19871,7 @@
    title=dom-table-rows><a href="#rows">rows</a></code> collection; for table
    sections, that's the <code title=dom-tbody-rows><a
    href="#rows0">rows</a></code> collection). If there is no such parent
-   element, then the attribute must return 0.
+   element, then the attribute must return &#x2212;1.
 
   <p>The <dfn id=cells title=dom-tr-cells><code>cells</code></dfn> attribute
    must return an <code><a href="#htmlcollection0">HTMLCollection</a></code>
@@ -20299,8 +20300,7 @@
     <ol>
      <li>
       <p><i>Column groups</i>: Process the <var title="">current
-       element</var> according to the appropriate one of the following two
-       cases:</p>
+       element</var> according to the appropriate case below:</p>
 
       <dl class=switch>
        <dt>If the <var title="">current element</var> has any <code><a

Modified: source
===================================================================
--- source	2008-03-23 18:38:30 UTC (rev 1393)
+++ source	2008-03-23 18:53:42 UTC (rev 1394)
@@ -16905,14 +16905,14 @@
 
   <p>The <dfn title="dom-table-caption"><code>caption</code></dfn> DOM
   attribute must return, on getting, the first <code>caption</code>
-  element child of the <code>table</code> element. On setting, if the
-  new value is a <code>caption</code> element, the first
-  <code>caption</code> element child of the <code>table</code>
-  element, if any, must be removed, and the new value must be inserted
-  as the first node of the <code>table</code> element. If the new
-  value is not a <code>caption</code> element, then a
-  <code>HIERARCHY_REQUEST_ERR</code> DOM exception must be raised
-  instead.</p>
+  element child of the <code>table</code> element, if any, or null
+  otherwise. On setting, if the new value is a <code>caption</code>
+  element, the first <code>caption</code> element child of the
+  <code>table</code> element, if any, must be removed, and the new
+  value must be inserted as the first node of the <code>table</code>
+  element. If the new value is not a <code>caption</code> element,
+  then a <code>HIERARCHY_REQUEST_ERR</code> DOM exception must be
+  raised instead.</p>
 
   <p>The <dfn
   title="dom-table-createCaption"><code>createCaption()</code></dfn>
@@ -16928,16 +16928,16 @@
 
   <p>The <dfn title="dom-table-tHead"><code>tHead</code></dfn> DOM
   attribute must return, on getting, the first <code>thead</code>
-  element child of the <code>table</code> element. On setting, if the
-  new value is a <code>thead</code> element, the first
-  <code>thead</code> element child of the <code>table</code> element,
-  if any, must be removed, and the new value must be inserted
-  immediately before the first element in the <code>table</code>
-  element that is neither a <code>caption</code> element nor a
-  <code>colgroup</code> element, if any, or at the end of the table
-  otherwise. If the new value is not a <code>thead</code> element,
-  then a <code>HIERARCHY_REQUEST_ERR</code> DOM exception must be
-  raised instead.</p>
+  element child of the <code>table</code> element, if any, or null
+  otherwise. On setting, if the new value is a <code>thead</code>
+  element, the first <code>thead</code> element child of the
+  <code>table</code> element, if any, must be removed, and the new
+  value must be inserted immediately before the first element in the
+  <code>table</code> element that is neither a <code>caption</code>
+  element nor a <code>colgroup</code> element, if any, or at the end
+  of the table otherwise. If the new value is not a <code>thead</code>
+  element, then a <code>HIERARCHY_REQUEST_ERR</code> DOM exception
+  must be raised instead.</p>
 
   <p>The <dfn
   title="dom-table-createTHead"><code>createTHead()</code></dfn>
@@ -16956,16 +16956,16 @@
 
   <p>The <dfn title="dom-table-tFoot"><code>tFoot</code></dfn> DOM
   attribute must return, on getting, the first <code>tfoot</code>
-  element child of the <code>table</code> element. On setting, if the
-  new value is a <code>tfoot</code> element, the first
-  <code>tfoot</code> element child of the <code>table</code> element,
-  if any, must be removed, and the new value must be inserted
-  immediately before the first element in the <code>table</code>
-  element that is neither a <code>caption</code> element, a
-  <code>colgroup</code> element, nor a <code>thead</code> element, if
-  any, or at the end of the table if there are no such elements. If
-  the new value is not a <code>tfoot</code> element, then a
-  <code>HIERARCHY_REQUEST_ERR</code> DOM exception must be raised
+  element child of the <code>table</code> element, if any, or null
+  otherwise. On setting, if the new value is a <code>tfoot</code>
+  element, the first <code>tfoot</code> element child of the
+  <code>table</code> element, if any, must be removed, and the new
+  value must be inserted immediately before the first element in the
+  <code>table</code> element that is neither a <code>caption</code>
+  element, a <code>colgroup</code> element, nor a <code>thead</code>
+  element, if any, or at the end of the table if there are no such
+  elements. If the new value is not a <code>tfoot</code> element, then
+  a <code>HIERARCHY_REQUEST_ERR</code> DOM exception must be raised
   instead.</p>
 
   <p>The <dfn
@@ -17371,7 +17371,8 @@
   <code>table</code> element, return the index of the <code>tr</code>
   element in that <code>table</code> element's <code
   title="dom-table-rows">rows</code> collection. If there is no such
-  <code>table</code> element, then the attribute must return 0.</p>
+  <code>table</code> element, then the attribute must return
+  &#x2212;1.</p>
 
   <p>The <dfn
   title="dom-tr-sectionRowIndex"><code>sectionRowIndex</code></dfn>
@@ -17382,7 +17383,7 @@
   that's the <code title="dom-table-rows">rows</code> collection; for
   table sections, that's the <code title="dom-tbody-rows">rows</code>
   collection). If there is no such parent element, then the attribute
-  must return 0.</p>
+  must return &#x2212;1.</p>
 
   <p>The <dfn title="dom-tr-cells"><code>cells</code></dfn> attribute
   must return an <code>HTMLCollection</code> rooted at the
@@ -17804,8 +17805,7 @@
      <li>
 
       <p><i>Column groups</i>: Process the <var title="">current
-      element</var> according to the appropriate one of the following
-      two cases:</p>
+      element</var> according to the appropriate case below:</p>
 
       <dl class="switch">
 




More information about the Commit-Watchers mailing list