Type Method


Returns the currently executing JavaScript function.


+ (JSValue *)currentCallee;

Return Value

The currently executing JavaScript function, or nil if not within native code called from JavaScript.


Call this method within an Objective-C or Swift block or method invoked from within JavaScript to obtain a JSValue object representing the JavaScript function responsible for executing that code.

If not currently in code invoked as a callback from JavaScript, this method returns nil.

See Also

Inspecting Callback State in a Running Context

+ currentContext

Returns the context currently executing JavaScript code.

+ currentThis

Returns the value of the this keyword in currently executing JavaScript code.

+ currentArguments

Returns the arguments to the current native callback from JavaScript code.