onBefore

abstract var onBefore: (before: Before) -> Function<*>(source)

The before hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.

Since

v17.1.0, v16.14.0

Return

Call to stop the hook.

Parameters

before

The {@link Before | before callback} to call before a promise continuation executes.