[Webkit-unassigned] [Bug 9179] Implement select.options.add() method

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Thu Jun 29 04:22:22 PDT 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=9179


ddkilzer at kilzer.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|macdome at opendarwin.org,     |
                   |andersca at mac.com            |




------- Comment #9 from ddkilzer at kilzer.net  2006-06-29 04:22 PDT -------
(In reply to comment #8)
> What's the best way to handle a situation like this in the IDL?  Is there a way
> to send an Integer object as a JSValue to the Node class method
> (HTMLOptionsCollection::add()) instead of an 'int' so I know when it's not
> set?  Or is there a way to pass in the number of original arguments sent via
> the JavaScript function?  Thanks!

A commit log comment for Bug 8227 mentions that method overloading may be a
better long-term approach to optional arguments in JavaScript functions, which
is the same conclusion I reached after thinking about this problem for a few
days.  I will try to fix the above problem by teaching CodeGeneratorJS.pm about
overloaded methods.  Here's Maciej's comment from that commit (r13726):

* bindings/scripts/CodeGeneratorJS.pm: Added support for
ConvertUndefinedToTrue, for benefit of scroll methods where omitted arguments
should be treated as true.  However, maybe explicit overloading in the IDL
would be a better long-term approach for optional arguments.


-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list