I agree. "Repeating", it seems to me, should be an optional argument;  
the callback and time, on the other hand, are completely necessary.

The default value for "repeating" is probably up for debate. Would  
more web developers use it for repitition, or for single-use? For high  
resolution purposes (the original purpose of the proposed API), it  
seems more likely to be one use only.

Sent from Alex's iPhone

On Oct 2, 2008, at 8:50 PM, "Aaron Boodman" <[EMAIL PROTECTED]> wrote:

> On Thu, Oct 2, 2008 at 5:05 PM, Maciej Stachowiak <[EMAIL PROTECTED]>  
> wrote:
>> Timer startTimer(double delayInSeconds, bool repeating, Function
>> callback);
>>
>> interface Timer {
>>    void stop();
>> }
>
> One other random idea. What about mixing up the param order for
> parallelism with the existing timer APIs:
>
> Timer startTimer(Function callback, double delay, bool repeating);
>
> That would make a call look like this:
>
> var timer = startTimer(function() { ... }, 42, true);
>
> Which feels more familiar, but at the same timer better. Less new
> things to remember. Also, I think this argues for the unit to continue
> being milliseconds, again, for familiarity.
>
> - a
> _______________________________________________
> webkit-dev mailing list
> webkit-dev@lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to