[Webkit-unassigned] [Bug 139179] HTMLSelectElement add() should support index as second argument

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 24 12:50:52 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=139179

--- Comment #35 from Darin Adler <darin at apple.com> ---
(In reply to comment #33)
>       1) Adding question marks to indicate that the arguments are nullable
> seems to work fine, also added new add() api below the old add() api. But no
> need to make argument1 as nullable

Are you sure the first argument is not optional? We need to be sure that we have test cases that cover that, one way or another.

>      2) With above changes all tests worked fine, but
> add(element1,Undefined), adds element1 to begining of list, but it should
> add element1 to end of list.

Yes, sounds like a real problem.

>      3) Yes, right HTMLOptionsCollection also needs to change, but here they
> are using custom code instead of generated code. so should we remove custom
> code and make add() api to use generated code ? i.e same as
> HTMLSelectElement.
> Or modify generated code ?. Will try both methods and tests to update patch.

Longer term we would like both of these methods to use generated code, but only if we can make the generated code work properly. Correct behavior is more important than generating the code, but it’s not good for us to have a lot of custom functions. Each custom function is an opportunity to have subtle mistakes and code that’s harder to refactor later as we improve how DOM bindings work. Whereas we can make changes to all the generated functions much more efficiently and consistently.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141224/80a8d5fb/attachment-0002.html>


More information about the webkit-unassigned mailing list