W3C home > Mailing lists > Public > public-webapi@w3.org > April 2008

Re: [Bindings] [[Delete]], hidden operations, missing arguments

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Thu, 10 Apr 2008 20:41:58 -0700
Message-ID: <c9e12660804102041g46e256a0x506f188a8bd2fe3d@mail.gmail.com>
To: "Ian Hickson" <ian@hixie.ch>
Cc: public-webapi@w3.org

On Thu, Apr 10, 2008 at 7:46 PM, Ian Hickson <ian@hixie.ch> wrote:
>  It would be useful to be able to specify a method to implement [[Delete]]
>  on an interface.
That seems kind of strange. It seems even strange to me that methods
(replete with implementation) can be added to the interface's
prototype, in implementation code, and that this actually gives the
object the method.

>  It would be useful to be able to define a method that isn't visible to JS,
>  in particular for implementing [NameGetter], [Delete], etc..
>  It would be nice for the spec to explicitly say how to handle argument
>  calls that have not enough arguments, both for normal methods and for
>  overloaded methods. (The right answer probably being whatever IE does.)
I take it you mean "how to handle method calls, where the argument is
shorter than the number of formal parameters."

That could be complicated.

Either throw an error or have the "false-ish" value conversion of
undefined, or assume a default value if not specified. Hypothetical

addEventListener( document, click ); // use capture is undefined,
default is false.

initMouseEvent(type, canBubble, cancelable, view,
                     detail, screenX, screenY, clientX, clientY,
                     ctrlKey, altKey, shiftKey, metaKey,
                     button, relatedTarget);

(I always forget those long string of boolean args).

Too bad relatedTarget is last. I think the canBubble argument being
second was not the best choice, AFAIK mouseevents always bubble (until
propagation is stopped. that is).

There's cloneNode( deep ); If deep were omitted, it could be false?

>  And finally, please rename the spec Web IDL. :-)
>  Thanks,
>  --
>  Ian Hickson               U+1047E                )\._.,--....,'``.    fL
>  http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
>  Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 11 April 2008 03:42:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:10:00 UTC