Re: HTMLTableElement.insertRow()

> 1. Most people expects insertRow(getLength()) to append a row yet given
> index is clearly not in the range of valid index values.
> 2. index can be end up being a very large number erroneously.  I think it
is
>safer to append just one row.

Agreed. Rephrasing the question, is it better to generalize the
just-past-the-end behavior, or recognize it as a specific expression of
"append"? The former has convenience benefits, the latter has
application-design-error-detection benefits. Given the past decisions in
favor of making the DOM help novice programmers, I lean toward "tell them
they made a mistake" rather than "assume they knew what they were asking
for."


______________________________________
Joe Kesselman  / IBM Research
Unless stated otherwise, all opinions are solely those of the author.

Received on Wednesday, 7 October 1998 18:37:51 UTC