ES6 arrow function lexical this in V8

前端 未结 2 2168
执笔经年
执笔经年 2020-12-06 10:41

I have the following ES6 code using a fat arrow function:

var test = {
  firstname: \'David\',
  fn: function() {
    return [\'one\', \'two\', \'tree\'].map         


        
2条回答
  •  没有蜡笔的小新
    2020-12-06 11:34

    Lexical this is the last part of ES6 arrow functions to land in v8 and it is the reason why it is still behind a flag and not ready to ship yet. Adrian Perez at Igalia is implementing arrow functions and the final patch is almost ready to land as soon as a few TurboFan issues are worked out: https://codereview.chromium.org/883823002/

提交回复
热议问题