[英]jquery arguments.callee
I'm trying to adjust a jquery script to my needs and encountered the following lines- 我正在尝试根据自己的需要调整jquery脚本,并遇到以下几行:
arguments.callee.eabad1be5eed94cb0232f71c2e5ce5 = function() {
_c3();
_c4();
return;
};
what is it? 它是什么?
arguments.callee
refers to the function begin called. arguments.callee
指的是开始调用的函数。 So your code assign a function to the eabad1be5eed94cb0232f71c2e5ce5
property of the function you're in. 因此,您的代码为您所在函数的
eabad1be5eed94cb0232f71c2e5ce5
属性分配了一个函数。
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
: 这是一段代码,其中使用
argument.callee
将函数g()
分配给另一个函数f()
的属性:
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. argument.callee
通常在匿名函数内部用于引用自己。 Though I believe it can't be used in ECMAScript 5 strict mode . 尽管我相信它不能在ECMAScript 5 严格模式下使用 。
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(); 参数是一个持有被调用方的对象,该被调用方拥有变量eabad1be5eed94cb0232f71c2e5ce5,该变量已由function(){_c3();转换为函数或方法。 _c4();
_c4(); return;
返回; };
};
from what I see... 从我所见...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.