arguments.callee Property |
Flash 5 |
a reference to the function being executed |
read/write |
Description
The callee property stores a reference to the
function currently executing. We can use this reference to execute
the current function again or to identify the current function
through comparison.
Example
function someFunction () {
trace(arguments.callee = = someFunction); // Displays: true
}
// An unnamed recursive function
countToTen = function () {
i++;
trace(i);
if (i < 10) {
arguments.callee();
}
};
// Invoke the unnamed recursive function
countToTen();
|