Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

egg中获得当前函数内获得当前函数的名称 #2017

Closed
phper-chen opened this issue Jan 24, 2018 · 5 comments
Closed

egg中获得当前函数内获得当前函数的名称 #2017

phper-chen opened this issue Jan 24, 2018 · 5 comments

Comments

@phper-chen
Copy link

请问有获取方法吗?arguments.callee类似于这样的

@dead-horse
Copy link
Member

egg 就是普通的 js 代码,没有特殊的能力

@atian25
Copy link
Member

atian25 commented Jan 24, 2018

JS 可以怎么样,就怎么样。

@phper-chen
Copy link
Author

phper-chen commented Jan 25, 2018

要是可以用 我也不会来问了啊 被框架禁用了 在controller里面的async函数中console.log(arguments) 会提示严格模式下禁用该属性的访问
我关了仍然是这个提示

@atian25
Copy link
Member

atian25 commented Jan 25, 2018

这个跟框架没啥关系.... use strict 是 ES6 特性来着,建议还是去看看 JS 基础吧。
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments/callee

@ngot
Copy link
Member

ngot commented Jan 25, 2018

这是一个JS领域的『月经』问题。

可以看看这个讨论:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants