W3C home > Mailing lists > Public > public-webapi@w3.org > April 2006

Re: ISSUE-70: what to do about window timers?

From: Robin Berjon <robin.berjon@expway.fr>
Date: Tue, 4 Apr 2006 12:50:38 +0200
Message-Id: <91DFBE2E-C01C-4EFA-9E9C-013AAFCC58A1@expway.fr>
To: Web APIs WG <public-webapi@w3.org>

Hi Maciej,

On Apr 04, 2006, at 12:30, Web APIs Issue Tracker wrote:
> What to do about timers? Some rough options:
> A.1) Define in an ECMAScript-only way, and assume other languages  
> all have their own built-in timer
> facility. But is that true? In particular, do they have one that is  
> usable in a browser scripting context? I
> am not sure, since timer facilities are generally based on some  
> sort of event loop, and the browser
> controls the event loop in this case.

I think we have to standardise the ES timers as they are currently  
available in browsers. That's the only way in which they can ever get  
reused by other specs. If we don't do that they'll have to invent new  
stuff, which it is our task to make sure they have no reason to do.

> B.1) Invent a new timer API that's more like the SVG uDOM one (but  
> simpler to use, it shouldn't take 4
> lines of code to set up a timer callback in ES). Define the  
> existing implemented Window timer methods
> in terms of this for ECMAScript only.

That's already part of our deliverables, so I would expect that we  
stick to the plan. We have to stick to what exists because it's what  
most people will be used to having and will want (and what will get  
implemented) but we need something simple and new that works for  
other languages, and that may have the extra advantage here or there  
so that ES folks may perhaps actually want to use it when available.  
For extra points we should define the relationship between the two  

> There is also the option of making it just like an EventListener,  
> but I don't think events are a good
> model for timers firing, most toolkit APIs I know of make timers  
> and events separate concepts.

I quite like the idea of an event based model because one could then  
wire in timer events into the rest of the system, such that it would  
work with SMIL, XML Events, etc.. I'm not married to it, but I like it.

The plan I had in mind was that I would dump what the SVG WG came up  
with into a spec, and put it up so that folks could start tearing it  
to pieces or falling in love with it (or both, if you're into that).  
I didn't have it up in high priority though, the FPWD is on the  
timeline in September (but we can be flexible about that).

> This is the one time in writing this spec I have felt the  
> temptation to invent a new feature. Someone
> smack me back to reality.

C'mon, hang in there, the better we stick to the documentation part  
of our jobs, the sooner we'll be able to get creative where needed ;)

Robin Berjon
    Senior Research Scientist
    Expway, http://expway.com/
Received on Tuesday, 4 April 2006 10:50:47 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:20 UTC