This feature is experimental. Please share your experiences so we know what to keep or change.
Runs a callback when the given element or its ancestors in the same layer were kept.
The callback to run.
It will be called with an up:fragment:kept argument.
A function that unsubscribes the callback.
When the element is destroyed, the callback will be unsubscribed automatically.
Tip Your coding agent can search these docs locally with the Unpoly agent skill