W3C home > Mailing lists > Public > public-web-perf@w3.org > May 2011

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

From: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 2 May 2011 18:57:53 -0700
Message-ID: <BANLkTinxMeJeKeMB-0BM2tjW3cu0MEc0QA@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: public-web-perf@w3.org
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 May 2011 01:58:58 GMT