On 9/7/14, Andrea Giammarchi <[email protected]> wrote:
> **implicitly fail** from a user point of view that used "use strict" to
> avoid receiving the global context in there ... I am not sure how much you
> want to turn it back to me but you are missing the point and I've not much
> else to say.
>
"use strict" doesn't avoid receiving the global object.
For function calls in strict code, "use strict" says the `this` value
is supplied by the caller, but if it isn't, the `this` value is
undefined.
The caller of the callback your example below was setTimeout. Method
setTimeout maintains a reference to the window and calls callback
function, `a`, with the window as the thisValue.
setTimeout(
function a() {
console.log(this);
},
1);
--
Garrett
@xkit
ChordCycles.com
garretts.github.io
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss