Function: onPatches()
function onPatches(subtreeRoot, listener): OnPatchesDisposer;
Adds a listener that will be called every time a patch is generated for the tree of the given target object.
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
| Parameter | Type | Description |
|---|---|---|
subtreeRoot | object | Subtree root object of the patch listener. |
listener | OnPatchesListener | The listener function that will be called everytime a patch is generated for the object or its children. |
Returns
A disposer to stop listening to patches.