ISSUE-37: Timers in window interface
http://www.w3.org/2005/06/tracker/webapi/issues/37
Raised by: Ian Davis
On product: Window
Maciej's initial draft [1] introduces a new TimerListener interface that is
passed to the setTimeout and setInterval methods. This seems like a break to
existing behaviour which is to pass a function or a string to be eval'ed. There
has been some discussion on the lists about this design but no clear consensus.
Clearly it's a goal to rationalise the window interface so that it fully
supports DOM events but we also need to document existing behaviour.
My proposal is to keep setInterval/setTimer in their two argument function
forms, i.e. they expect a function as first argument and a delay in milliseconds
for the second. The parameter list form has been shown to be non-interoperable
[2]. We don't endorse support for the string eval form.
We then define new events for the interval and timer - although I'm not sure
about the mechanics at this stage. Should it be setIntervalListener?
[1] http://dev.w3.org/cvsweb/2006/webapi/Window/source/Window.xml
[2] http://lists.w3.org/Archives/Public/public-webapi/2006Feb/0050.html