My function somehow doesn’t have access to its parent closure & is missing variables. How?

后端 未结 2 1887
既然无缘
既然无缘 2021-01-04 07:23

In my top-level function, I’m importing some dependencies using require.js. And they’re there, no problem. Within this function, I define a callback function and attempt to

2条回答
  •  没有蜡笔的小新
    2021-01-04 07:52

    if you use eval() inside your closure Chrome will not use any of it's performance optimizations which means you can see the value of y

提交回复
热议问题