On Sun, Sep 7, 2014 at 11:44 AM, Garrett Smith <[email protected]> wrote:
> On 9/7/14, Domenic Denicola <[email protected]> wrote: > > I don't understand why this is any more surprising than any other > function > > that calls its callback with .call(something). It doesn't matter whether > the > > callback is strict or not; .call(window), which is what the spec does, > will > > override it. > > > > As far as I can see this issue has absolutely nothing to do with strict > vs. > > sloppy. > > > I agree on that point; setTimeout passes the window to the callback as > the this value. But that has nothing to do with inheritance. > Who said anything about inheritance? > > Method setTimeout uses the global object as the `this` value for the > callback function, much like addEventListener, etc, as does > `.call(window)` like you mentioned. > Yes it does. The question is: should it? -- Cheers, --MarkM
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

