Table of Contents

arguments.callee Property Flash 5

a reference to the function being executed read/write
arguments.callee

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();

Table of Contents