From 1b579b1d6e58afa8726f173223f7954e93d4eb9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Tue, 18 Oct 2016 12:02:18 +0200 Subject: [PATCH] Make table.deleteRow(-1) a no-op when there are no rows This copies the wording of tbody.deleteRow, with "its parent" instead of "this element". The previous wording would throw for this case. Tests: https://github.com/w3c/web-platform-tests/pull/4001 --- source | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/source b/source index 162dddcac5f..6fcfc0213e4 100644 --- a/source +++ b/source @@ -38255,19 +38255,16 @@ interface HTMLTableElement : HTMLElement { steps:

    +
  1. If index is less than −1 or greater than or equal to the number of + elements in the rows collection, then throw an + "IndexSizeError" DOMException.

  2. -
  3. If index is equal to −1, then index must be - set to the number of items in the rows collection, minus - one.

  4. - -
  5. Now, if index is less than zero, or greater than or equal to the - number of elements in the rows collection, the method must - instead throw an "IndexSizeError" DOMException, and these - steps must be aborted.

  6. - -
  7. Otherwise, the method must remove the indexth element in the rows collection from its parent.

    +
  8. If index is −1, then remove + the last element in the rows collection from its parent, or + do nothing if the rows collection is empty.

  9. +
  10. Otherwise, remove the indexth element + in the rows collection from its parent.