RE: [SVGMobile12] namespace events are not qualified?

Hi Jon,

> "click" and "ev:click" are equivalenced, so you can say either.
> Most older W3C spec, including SVG 1.0/1.1, used DOM2 Events 
> which did not support namespacing. With DOM3 Events, 
> namespaced events were introduced and all of the standard 
> events defined in the DOM3 Events spec were defined to be in 
> the XML Events namespace. Thus, "click" was defined to be in 
> ev:click. The only way to make it so that old content which 
> just said "click" would still work in a user agent which 
> moves up to DOM3 Events is to say that "click" and "ev:click" 
> are equivalenced.

Well, it's not really that they are 'equivalent'...more like promiscuous ;).

Let's say we register for:

   * click
   * ev:click
   * myns:click
   * yourns:click


1. If we dispatch the old DOM 2 Event "click", *all* of these listeners
   will be triggered.


2. If we dispatch the new DOM 3 Event "ev:click" then we get the desired
   behaviour, in that only the following two listeners would be triggered:

   * click
   * ev:click


3. But if we dispatch some other DOM 3 Event "myns:click", the old DOM 2
   Event listener is *still* triggered:

   * click
   * myns:click

   "ev:click" is correctly *not* triggered, but the problem here is that
   "click" is probably not meant to be triggered, since the author has
   been told it is 'equivalent' to "ev:click".


So, as you can see "click" is not made equivalent to "ev:click", but
equivalent to "everything:click"!

Personally, I think is not a great design; I may be the author of a document
that used an sXBL that you wrote, and I may not be fully aware of the events
that are flying around. To be safe I would need to make sure that none of my
events are called anything in the DOM 3 Events specification.

One possible solution would to go back to DOM 3 Events and make all 'legacy'
or 'core' events exist in no namespace rather than "ev". That way there is
only one "click" event, and it is the same event in both DOM 2 Events and
DOM 3 Events.

Regards,

Mark


Mark Birbeck
CEO
x-port.net Ltd.

e: Mark.Birbeck@x-port.net
t: +44 (0) 20 7689 9232
w: http://www.formsPlayer.com/
b: http://internet-apps.blogspot.com/

Download our XForms processor from
http://www.formsPlayer.com/

Received on Thursday, 19 May 2005 17:04:37 UTC