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 29014 - HTMLTableRowElement.deleteCell(-1) should delete last cell
Summary: HTMLTableRowElement.deleteCell(-1) should delete last cell
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 16:30 UTC by David Zbarsky
Modified: 2015-08-28 15:01 UTC (History)
2 users (show)

See Also:


Attachments

Description David Zbarsky 2015-08-02 16:30:08 UTC
-1 should map to cells.length, like it does for insertCell. I checked that Chrome, Firefox and Safari do so for the following testcase:

<table>
   <tr id="testTr">
        <td>ABCDE</td>
        <td>12345</td>
        <td>ABC12</td>
    </tr>
</table>

<script>
var tr = document.getElementById("testTr");
tr.deleteCell(-1);
</script>