Skip to main content

Function: onGlobalPatches()

function onGlobalPatches(listener): OnPatchesDisposer;

Adds a listener that will be called every time a patch is generated anywhere. Usually prefer using onPatches.

The listener runs inside the action that made the change, so getCurrentActionContext() returns that action's context: its rootContext is the top-level action (for a flow step, the flow).

Parameters​

ParameterTypeDescription
listenerOnGlobalPatchesListenerThe listener function that will be called everytime a patch is generated anywhere.

Returns​

OnPatchesDisposer

A disposer to stop listening to patches.