我有一计: class Thing { constructor(name) { this.name = name; globalThis.name = name; } } 当然更好的做法是通过 `Proxy` 拦截 `can` 的 `getter`,在得到 `speak` 属性之前设置 `globalThis.name`,`speak` 函数调用之后还原 `globalThis.name`。 也有其它做法: [Github gist](https://gist.github.com/nramirez/625fdcf5cf3e2697242befd4417225a6): const funcStr = callback.toString() const finalFunc = eval(funcStr)