This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29015 - HTMLTableSectionElement.deleteRow(-1) should delete last row
Summary: HTMLTableSectionElement.deleteRow(-1) should delete last row
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-02 17:05 UTC by David Zbarsky
Modified: 2015-08-28 15:02 UTC (History)
2 users (show)

See Also:


Attachments

Description David Zbarsky 2015-08-02 17:05:38 UTC
-1 should map to rows.length, like it does for insertRow. I checked that Chrome, Firefox and Safari do so for the following testcase:

<table>
   <tbody id="testBody">
     <tr><td>ABCDEF</td></tr>
     <tr><td>12345</td></tr>
     <tr><td>ABC12345DEF</td></tr>
   </tbody>
 </table>

<script>
var tbody = document.getElementById("testBody");
tbody.deleteRow(-1);
</script>