<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>29015</bug_id>
          
          <creation_ts>2015-08-02 17:05:38 +0000</creation_ts>
          <short_desc>HTMLTableSectionElement.deleteRow(-1) should delete last row</short_desc>
          <delta_ts>2015-08-28 15:02:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Zbarsky">dzbarsky</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>122366</commentid>
    <comment_count>0</comment_count>
    <who name="David Zbarsky">dzbarsky</who>
    <bug_when>2015-08-02 17:05:38 +0000</bug_when>
    <thetext>-1 should map to rows.length, like it does for insertRow. I checked that Chrome, Firefox and Safari do so for the following testcase:

&lt;table&gt;
   &lt;tbody id=&quot;testBody&quot;&gt;
     &lt;tr&gt;&lt;td&gt;ABCDEF&lt;/td&gt;&lt;/tr&gt;
     &lt;tr&gt;&lt;td&gt;12345&lt;/td&gt;&lt;/tr&gt;
     &lt;tr&gt;&lt;td&gt;ABC12345DEF&lt;/td&gt;&lt;/tr&gt;
   &lt;/tbody&gt;
 &lt;/table&gt;

&lt;script&gt;
var tbody = document.getElementById(&quot;testBody&quot;);
tbody.deleteRow(-1);
&lt;/script&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122855</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-08-28 15:02:02 +0000</bug_when>
    <thetext>Thank you, fixed:

https://github.com/whatwg/html/commit/558ab404df04ea49fde606f93a44b3f5cc45e510</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>