如何调用没有var的匿名函数?

时间:2016-08-27 04:20:03

标签: javascript anonymous-function

我正在尝试调用其他人提出的以下匿名函数,但似乎没有任何方法可以执行此操作,因为我找不到它的变量名。

chrome调试器中的callstack有SomeFunction,后跟(匿名函数),后跟(匿名函数),然后是dispatch,接着是r.handle

更新的问题

...
pid = fork ();
if (pid < 0)
{
  perror ("fork");
  exit (1);
}
else if (pid != 0)
{
  printf (_("Continuing in background, pid %d.\n"), (int)pid);
  if (logfile_changed)
    printf (_("Output will be written to `%s'.\n"), opt.lfilename);
  exit (0);         
}
setsid ();
freopen ("/dev/null", "r", stdin);
freopen ("/dev/null", "w", stdout);
freopen ("/dev/null", "w", stderr);
...

如何从外部调用SomeFunction(function(){})?从里面怎么样?

我尝试使用SomeFunction()来调用它,但它返回未定义。

我会通过

来调用它吗?
(function() {
ss.initClass(Eb, h, {
    SomeFunction: function(a) {
        var b = this.proxy,
            c = new MyStuff;
        c.Id = 5;
        b.SendStuff(c, key.word(this, function(b) {
            0 === b.Code && this.CurrentStuff(a)
        }))
    },
}, m);
})();

function.ss.initClass(eb, h, SomeFunction(), m)

还是我走错了路?

0 个答案:

没有答案