ui/client/features/pages-editor/services/PageChangePolling
Cockpit client (features), next. Source: ui/client/features/pages-editor/services/PageChangePolling.ts.
Variables#
PAGE_CHANGE_POLL_MS#
constPAGE_CHANGE_POLL_MS:1500=1500
Defined in: ui/client/features/pages-editor/services/PageChangePolling.ts:3
Functions#
watchPageChange()#
watchPageChange(
read,onChange,intervalMs?): () =>void
Defined in: ui/client/features/pages-editor/services/PageChangePolling.ts:8
Timers are external effects (SERVICE-001): the external-change loop lives here, not in its hook.
Read the open file's last external change once now, then every intervalMs, handing each answer to
onChange; a read that fails is ignored and an answer that lands after the returned stop function ran is dropped.
Parameters#
read
() => Promise<{ change?: PageChange | null; }>
onChange
(change) => void
intervalMs?
number = PAGE_CHANGE_POLL_MS
Returns#
() => void