W3C home > Mailing lists > Public > www-forms@w3.org > February 2002

Re: Events review part II: 4.3 Interaction Events

From: Jérôme Nègre <jerome.negre@e-xmlmedia.fr>
Date: Mon, 4 Feb 2002 16:47:56 +0100
Message-ID: <02e701c1ad93$5bf20530$630aa8c0@fischer>
To: "Mikko Honkala" <Mikko.Honkala@hut.fi>, <www-forms@w3c.org>
> > That's what I thought first, but how do you know that the default action
> > been canceled ?
> > I only see a method defined in chapter 1.3.1, that is
> > EventTarget.dispatchEvent(evt). And you get that result only after
> > and bubbling phases.
> The DOM implementation, which takes care of the default actions for
elements, allows you to read this value. For instance, in
> Xerces, there is a field:
> EventImpl
> public boolean preventDefault=false;

Since there's no getter method, you should not have to read this field.

> As you pointed out, it is not possible to read this value from the DOM
level 2 interfaces. In what case you'd like to do that?

Well, according to my understanding of DOM Events, one would have to write
something like that:

EventTarget myTarget = ...;
Event myEvent = ...;
if(myTarget.dispatchEvent(myEvent)) {
    //do default processing, since nobody called preventDefault

How would you write something like in your understanding of DOM Events ?

Received on Monday, 4 February 2002 10:48:57 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:05 UTC