Skip to content

Instantly share code, notes, and snippets.

@qubyte
Last active June 11, 2016 08:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qubyte/43e0093274e793cc82ba to your computer and use it in GitHub Desktop.
Save qubyte/43e0093274e793cc82ba to your computer and use it in GitHub Desktop.
Fat arrow inconsistency between Aurora 33.0a2 (2014-08-24) and Canary 39.0.2135.0 canary (64-bit)
var a = true;
var test = () => console.log(this.a);
test(); // true
var test2 = test.bind({ a: false });
test2(); // Canary: false, Firefox: true
@WebReflection
Copy link

@phistuck pay attention to the arrow, the thin one does not bind the context at creation time. this would be the expected object in that method.

@qubyte
Copy link
Author

qubyte commented Sep 28, 2014

Wow, for some reason I got no notifications for this thread. Sorry all. @domenic is quite right. This was me looking at an experimental feature, and I was jumping the gun somewhat. Fat-arrows are only partially implemented in the version of V8 in that version of Canary and full support will come in time.

The two versions were not picked to be equivalent in terms of their development process. They just happened to be the browsers I was testing with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment