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

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

From: Christophe Jolif <cjolif@ilog.fr>
Date: Wed, 05 Apr 2006 17:18:01 +0200
Message-ID: <4433DFA9.8090508@ilog.fr>
To: Maciej Stachowiak <mjs@apple.com>
CC: Brad Fults <bfults@gmail.com>, Web APIs WG <public-webapi@w3.org>


Maciej Stachowiak wrote:
> 
> 
> On Apr 4, 2006, at 10:50 PM, Brad Fults wrote:
> 
>>
>> On 4/4/06, Web APIs Issue Tracker <dean+cgi@w3.org> wrote:
>>> A.2) Define using a TimerListener interface which is meant only for 
>>> other languages, while ECMAScript only actually allows strings or 
>>> functions to be passed.
>>
>> I (and others) strongly advise against specifying a timer interface
>> that accepts strings of code as executable input.
>>
>> It can continue to exist as an implemented behavior, but as it
>> essentially uses eval() for its functionality, it should be strongly
>> discouraged, and certainly not officially specified.
> 
> I don't think the right way to make coding style suggestions is to fail 
> to specify things. To be interoperable with a considerable amount of 
> existing web content, UAs MUST implement the string interface. Note that 
> the ECMAScript spec includes eval(), even though many contributors to 
> the specification dislike it.
> 
> On the other hand, I would be happy to put a note in the spec that the 
> string interface is discouraged for content authors. I agree that it is 
> better in all respects to use a function, when writing new JS code that 
> uses the Window interface.

Also to note, Compact (Mobile) ECMAScript profile (ECMA-372) doesn't 
require eval() and thus would probably prevent timeout String method 
from beeing implemented.

I think it would be one more argument to not require it in Window spec.

-- 
Christophe
Received on Wednesday, 5 April 2006 15:17:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:54 GMT