[whatwg] Scripting Tweaks
liorean
liorean at gmail.com
Sat May 19 18:33:35 PDT 2007
> > Ian Hickson wrote:
> > >>Speaking of setTimeout, where is this defined?
> > > http://whatwg.org/specs/web-apps/current-work/#settimeout
> On 4/21/05, Dean Edwards <dean at edwards.name> wrote:
> > OK. That's twice in one day. I'm off to read the WA1 spec....
On 21/04/05, Jim Ley <jim.ley at gmail.com> wrote:
> It's rather odd though, as it's been defined such that the mozilla
> implementation will be non-conformant, either the mozilla
> implementation will need to change to be conformant - breaking
> compatibility with existing scripts. Or mozilla will not be able to
> be conformant.
As I understand it, there are currently two different signatures, the
Microsoft one and the Netscape one.
The Netscape one adds a virtually unlimited number of optional
arguments to send to the function when the timer triggers. (IIRC in
reality it's limited to a maximum of 2^16-3 arguments, so it's not
really unlimited. But how many scripts in the wild use 65 533
arguments for any function, anyway?)
The Microsoft one adds a single optional argument specifying which
language the string is to be parsed as.
The Netscape signature is for when the first argument is a function
reference, the Microsoft signature for when the first argument is
string containing the timer function source code.
Exactly how is that incompatible with the Mozilla implementation?
I can, without actually testing code, only see one possible incompatibility:
If the Mozilla implementation also allow the Netscape signature for
when the first argument is a string. If that is the case, it is a
pretty obscure usage that I can't imagine has found much use on the
web considering how it is incompatible with Microsoft's
implementation. If this is the incompatibility you're speaking of, is
there any data on how common this practice is, as well as how common
the incompatible Microsoft variant is?
--
David "liorean" Andersson
More information about the whatwg
mailing list