- From: Christophe Jolif <cjolif@ilog.fr>
- Date: Mon, 18 Nov 2002 10:53:56 +0100
- To: Jim Ley <jim@jibbering.com>
- Cc: www-svg@w3.org
Jim, I presume that I will not reveal a secret by telling you that a similar issue has already been raised inside the Working Group and even if we didn't have time to solve it for the first public working draft, it will hopefully be studied for a future one :-) Jim Ley wrote: > Hi, > > setInterval (applies to setTimeout too) is defined as > > Object setInterval ( in DOMString code, in long delay ); > > firstly you have an inconsistency with clearInterval where the type of the > parameter is "object", but that's a typo I guess, I assume you're using > object to refer to some implementation specific object, what it is is up > to the authors? > > Current implementations are not as simple as the above, > > setInterval("moo()",1000) > and > setInterval(moo,1000) > > are both allowed, and do the same thing - so the first parameter is a > DOMString, the second a function reference, the latter a function > reference is more efficient, and also the only available in at least 1 > mobile javascript implementation in the HTML world (the DOMString one > requires a compiler on the device AvantGo for the Palm compiles the script > on a server) > > In a mixed script language world, which language is the DOMString assumed > to be? IE's setTimeout implementation has a 3rd parameter "language" > (although not as mime-type unfortunately) > > With the DOMString method, we cannot pass objects to functions being > called, i.e.: > > moomin=SVGDoc.getElementsByTagName("rect").item(7) > setTimeout("changeColour(moomin)",1000) > or > setTimeout("changeColour("+moomin+")",1000) > > don't do what we would want, and the workarounds are inefficient, > especially with internal rather than DOM objects. A number of browsers in > the HTML world, including Netscape, allow: > > setTimeout(changeColour,1000,moomin) > > to do what we want, the same would be nice in SVG. -- Christophe
Received on Tuesday, 19 November 2002 04:30:26 UTC