W3C home > Mailing lists > Public > www-svg@w3.org > March 2004

Re: SVGTimer complaints

From: Jim Ley <jim@jibbering.com>
Date: Sun, 7 Mar 2004 20:39:08 -0000
To: www-svg@w3.org
Message-ID: <c2g1cc$j9b$1@sea.gmane.org>

"Jan-Klaas Kollhof" <keyjaque@yahoo.com> wrote in message
> Why is the runnable interface needed.
> The timer fires an event.
> This event should be handled by a handler.
> We already have interfaces for adding listeners
> and also interfaces for the handlers (DOM).

I fully agree with this, in fact I thought I'd said so before, but couldn't
see it in the archives...

>   t = createAndSartTimer(500);
>   t.addEventListener(l)

Hmm, one problem with this approach is that adding the event listener after
the createAndStart is a bit of a pain.

my favoured option would be to have a copy of dispatchEvent which takes a
time aswell:

someObj.dispatchEventDelayed(myEvt, 500);

And perhaps allow the window interface to also catch events so you could do:

window.dispatchEventDelayed(myEvt, 500);

and avoid any bubbling etc. issues (it going straight and only to the window

> and it makes more sense with respect to all other
> objects/interfaces that fire events.


Received on Sunday, 7 March 2004 15:40:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:00 UTC