Name
Function.caller — the function that called this one
Availability
deprecated; not defined in strict mode
Synopsis
function
.
caller
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.
Get JavaScript: The Definitive Guide, 6th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.