- From: Geoffrey Garen <ggaren@apple.com>
- Date: Fri, 3 Oct 2008 00:03:41 -0700
- To: public-webapps@w3.org
- Cc: Maciej Stachowiak <mjs@apple.com>
Received on Friday, 3 October 2008 07:06:05 UTC
> // should be implemented by Window objects > interface WindowTimer { > Timer startTimer(in double delayInSeconds, in boolean repeating, > in TimerHandler handler); > } How about a "Timer" constructor function instead? Pros: * Fits the object-oriented programming model of "new Image", "new XMLHttpRequest", etc. * Enables use of object-oriented features like instanceof, the .constructor property, and prototype-based extensions to timer objects. * Distinguishes itself better from the old setTimeout / setInterval functions. > readonly attribute double timeElapsed; // time in seconds since "elapsedTime" reads better to me, since it makes "elapsed" definitely an adjective, and not a verb. Overall, I think this is a great proposal. Cheers, Geoff
Received on Friday, 3 October 2008 07:06:05 UTC