This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
If you do insertRow() on a table without arguments, browsers do different things: IE acts as if it were insertRow(-1). Firefox throws a "Not enough arguments" exception. WebKit/Opera act as if it were insertRow(0). Currently Firefox seems closest to the spec. I find https://bugzilla.mozilla.org/show_bug.cgi?id=157578 which has 2 dups.
Jonas Sicking <http://www.w3.org/mid/63df84f0811110326y10c54af3y51c7e589852d9243@mail.gmail.com>: > For what it's worth, I think this issue should be addressed by the > WebIDL spec so that we don't have to define for each and every > function what to do if not enough arguments are supplied. > > If we need different behavior for different functions (for, for > example, compat reasons) then WebIDL should be given hooks for that, > such as an [optional] keyword. Agreed. Operations are now defined to throw TypeError if insufficient arguments are thrown, and if optional arguments are actually wanted, [Optional] or overloading can be used to handle this.
(In reply to comment #1) > Agreed. Operations are now defined to throw TypeError if insufficient > arguments are thrown ... Er, if arguments are passed.