onUpdate()
The reserved update slot of the Dashlet handle. It
receives the normalized InitContext again whenever the host reports a
selection or context change after the init has settled. Full update
semantics are a later change — the slot is the stable, already-wired entry
point for them.
1. Signature
onUpdate(listener: (ctx: InitContext, info: UpdateInfo) => void): () => void;
-
listener— receives the freshly normalizedInitContext(the same shape asinit) and anUpdateInfoobject whosesourceis always'update'. -
Returns an unsubscribe function.
2. What routes here
| Source event | Environment |
|---|---|
|
webclient |
later |
webclient |
rich-client host callbacks after the first one (the first callback is the init; later ones are updates) |
rich client |
the v10.10 warm-up refresh (empty environment at client start; the re-emit carries the populated values once they appear) |
rich client |
Everything is delivered as the normalized InitContext — the listener does
not need to know which event type triggered the emission.
3. Notes
-
Listeners registered before the init settles never fire from the settle itself — the settle goes to
onInit(and theinitpromise); updates start with the first post-settle event. -
An exception thrown by an
onUpdatelistener is routed toonErrorlisteners — it never breaks the host call or the other listeners.