Re: Dropping (or deprecating) event initialization methods

On Fri, Sep 18, 2009 at 12:57 AM, Cameron McCormack <cam@mcc.id.au> wrote:
> As has been pointed out, there are problems with the current pattern of
> init* methods on event interfaces.  The below come to mind:
>
>  * it is difficult to remember the arguments to them (initMouseEvent
>    has 15!)
>
>  * adding attributes to an interface would mean either adding an
>    argument to the method (breaking binary compatibility for languages
>    where that matters) or introducing a new one to override the first
>
>  * adding attributes to a parent interface, like UIEvent, would mean
>    that the intuitive argument order could not be kept in the child
>    interface’s method
>
> I suggest that we dispense with this pattern,

Actually, I already proposed that and provided the same three reasons.

and instead make all of
> the attributes that these initializer methods would set writable.

Not a bad idea, but it doesn't work consistently in today's browsers.
It may either:
1) fail silently
2) throw errors

Did you read my proposal?

Garrett

Received on Friday, 18 September 2009 08:16:57 UTC