W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2009

Re: Dropping (or deprecating) event initialization methods

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Fri, 18 Sep 2009 01:16:16 -0700
Message-ID: <c9e12660909180116g7d21ab77te20985d78476ce5f@mail.gmail.com>
To: www-dom@w3.org
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?

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:36:55 UTC