Returns the callback registered at the root of the current hook chain, or nil if there is none. Lets a callback reach the top of a chain of hooks on the same target.

Returns

function or nil
The root callback, or nil.

Example

  • hook: where callbacks are registered.