Re: Strict mode callbacks and setTimeout

Allen Wirfs-Brock:
> Did you mean:
> (function() {"use strict"; return this}).call(undefined)

Yeah, I guess I did, thanks.  (I looked quickly at the description of and figured that the this value given to
[[Call]] was used unconditionally as the value of `this`, but of course
the “Entering Function Code” section of the spec does do the strict mode
check.  I think I assumed `` would be different from
`func()` even in non-strict mode.)

I also just realised that the checking of the this value that Boris
quoted will need to be tweaked so that static operations don’t throw.

Doesn’t setTimeout need to know which window object it is called on, so
that the right task queue is used?  (I guess that could be encoded into
the Window.prototype.setTimeout Function object, since there’ll only be
one window object per setTimeout Function anyway.)

Cameron McCormack ≝

Received on Thursday, 7 July 2011 00:15:40 UTC