JavaScript: The Definitive Guide

24.85. Function.caller: the function that called this one

JavaScript 1.0; deprecated by ECMAScript

24.85.1. Synopsis

function.caller

24.85.2. Description

In early versions of JavaScript, the caller property of a Function object is a reference to the function that invoked the current one. If the function is invoked from the top level of a JavaScript program, caller is null. This property may be used only from within the function (i.e., the caller property is only defined for a function while that function is executing).

Function.caller is not part of the ECMAScript standard and is not required in conforming implementations. It should not be used.

Категории