W3C home > Mailing lists > Public > www-dom@w3.org > April to June 1999

minor problem in add method in HTMLSelectElement in DOM level 1

From: Adam Dingle <adam@corp.avantgo.com>
Date: Wed, 28 Apr 1999 20:50:20 -0400 (EDT)
Message-ID: <000501be91da$2ed8a2c0$0b80000a@avantgo.com>
To: <www-dom@w3.org>
I've found a minor problem in the description of the "add" method in the
HTMLSelectElement interface in the DOM Level 1 specification.

The description of the "add" method reads:

    Add a new element to the collection of OPTION elements for this SELECT.
   element The element to add.
   before The element to insert before, or NULL for the head of the list.

The description of the "before" parameter should read "The element to insert
before, or NULL for the _tail_ of the list".  When I call add() to insert a new
element at the head (i.e. beginning) of the list, I can specify the first
element in the list as the value of "before", but when I want to insert a new
element at the tail (i.e. end) of the list, "before" must be NULL because the
new element will precede no existing element.

The implementation of add() in Microsoft Internet Explorer 5.0 inserts a new
element at the end of a list when "before" is NULL; see
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/add.asp .

This should probably be listed in the DOM Level 1 errata at
http://www.w3.org/DOM/updates/REC-DOM-Level-1-19981001-errata.html .

Received on Thursday, 29 April 1999 05:09:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:36:44 UTC