W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2011

Re: Replacing the event keyCode value.

From: Glenn Maynard <glenn@zewt.org>
Date: Thu, 1 Dec 2011 22:20:13 -0500
Message-ID: <CABirCh_eZYR+xVS5pcO-n6W2PGbt56KSvi03jiuZ8OodVbHtDA@mail.gmail.com>
To: Brad Pettit <Brad.Pettit@microsoft.com>
Cc: João Eiras <joaoe@opera.com>, "www-dom@w3.org" <www-dom@w3.org>
On Thu, Dec 1, 2011 at 8:53 PM, Brad Pettit <Brad.Pettit@microsoft.com>wrote:

> Having the keycode modifiable would be problematic because multiple
> listeners may be attached to an EventTarget, and the order of execution for
> EventListeners on any given node is not defined. In one implementation, the
> listener that modifies the code might execute first, while on another, it
> might execute last.
>
> <http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-flow-basic>
> "Although all EventListeners on the EventTarget are guaranteed to be
> triggered by any event which is received by that EventTarget, no
> specification is made as to the order in which they will receive the event
> with regards to the other EventListeners on the EventTarget"
>

You're reading a spec from over a decade ago.  This would never be
acceptable today; it would cause major interop problems.  DOM4 defines
event listeners as a list, and that's what all modern browsers implement.
http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#events

(I suspect DOM3 says the same thing, but I'm not as familiar with that
spec.)

-- 
Glenn Maynard
Received on Friday, 2 December 2011 03:20:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:08 GMT