Re: [AnimationRequestFrame] Initial editor's draft of AnimationRequestFrame spec available

On Mon, May 2, 2011 at 6:29 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>> 2.To increase adoption of the requestFrameAnimation(), it should be
>> syntactically similar to window.setInterval() or window.setTimeout().
>> This means that in addition to taking a FrameRequestCallback, we should
>> also allow inline script and additional arguments.
>
> I actually disagree on this.  Additional arguments add a lot of bookkeeping
> for a very rarely used edge case; authors who need that edge case can use a
> closure explicitly.  Also, note that allowing pass-through arguments here
> would preclude later adding an optional element argument unless we bake that
> optional element argument into the very first spec version.
>
> Similarly, I don't think we should allow string arguments: they're a
> security antipattern and we shouldn't add more such.

I agree with Boris here. I don't think that converting your code to
not use strings will be a big hurdle for adoption.

Also, allowing passing strings means giving authors a great tool for
slowing down the page since executing a string is slower than
executing a function.

/ Jonas

Received on Tuesday, 3 May 2011 01:58:57 UTC