---
title: currentCallee()
framework: javascriptcore
role: symbol
role_heading: Type Method
path: javascriptcore/jscontext/currentcallee()
---

# currentCallee()

Returns the currently executing JavaScript function.

## Declaration

```swift
class func currentCallee() -> JSValue!
```

## Return Value

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

## Discussion

Discussion 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

- [current()](javascriptcore/jscontext/current().md)
- [currentThis()](javascriptcore/jscontext/currentthis().md)
- [currentArguments()](javascriptcore/jscontext/currentarguments().md)
