最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - jquery arguments.callee - Stack Overflow

programmeradmin5浏览0评论

I'm trying to adjust a jquery script to my needs and encountered the following lines-

 arguments.callee.eabad1be5eed94cb0232f71c2e5ce5 = function() {
            _c3();
            _c4();
            return;
        };

what is it?

I'm trying to adjust a jquery script to my needs and encountered the following lines-

 arguments.callee.eabad1be5eed94cb0232f71c2e5ce5 = function() {
            _c3();
            _c4();
            return;
        };

what is it?

Share Improve this question asked Apr 12, 2010 at 0:51 GidonGidon 5372 gold badges6 silver badges18 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 7

arguments.callee refers to the function begin called. So your code assign a function to the eabad1be5eed94cb0232f71c2e5ce5 property of the function you're in.

To demonstrate this. Here's a snippet of code in which a function g() is assigned to a property of another function f() using argument.callee:

function f() {
    arguments.callee.g = function() {alert("Hello, World!")};
}

f();
f.g();  // Alerts "Hello, World!"

I'm not exactly sure what the code you posted is suppose to do.

argument.callee is often used inside anonymous functions to refer to themselves. Though I believe it can't be used in ECMAScript 5 strict mode.

Arguments is an object that holds callee that holds the variable eabad1be5eed94cb0232f71c2e5ce5 which is being turned into a function or method by the function() { _c3(); _c4(); return; };

from what I see...

发布评论

评论列表(0)

  1. 暂无评论