Перейти к содержимому
FastOffice

Push/event contract

Полный контракт событий: 7 каналов host → Web и 11 каналов Web → host.

onDocumentSessionSnapshot: onDocumentSessionSnapshot(callback: (snapshot: ShellDocumentSessionSnapshot) => void): () => void

fastdoc-shell:document-session-snapshot

onMenuCommand: onMenuCommand(callback: (command: MenuCommand) => void): () => void

fastdoc-shell:menu-command

onSaveBeforeClose: onSaveBeforeClose(callback: () => void): () => void

fastdoc-shell:save-before-close

onSaveBeforeCloseFailed: onSaveBeforeCloseFailed(callback: (payload: { message: string }) => void): () => void

fastdoc-shell:save-before-close-failed

onSaveBeforeDocumentSwitch: onSaveBeforeDocumentSwitch(callback: (request: { requestId: number }) => void): () => void

fastdoc-shell:save-before-document-switch

onStateChanged: onStateChanged(callback: (state: ShellBridgeState) => void): () => void

fastdoc-shell:state-changed

onSystemPaste: onSystemPaste(callback: (payload: SystemPastePayload) => void): () => void

fastdoc-shell:system-paste

completeSaveBeforeClose: completeSaveBeforeClose(payload: { saved: boolean; message?: string | null }): void

fastdoc-shell:save-before-close-result

completeSaveBeforeDocumentSwitch: completeSaveBeforeDocumentSwitch(result: { requestId: number; saved: boolean; savedPath: string | null; errorMessage: string | null; }): void

fastdoc-shell:document-switch-save-result

notifyCanonicalEditDropped: notifyCanonicalEditDropped(payload: { code: string; requestId: string; commandType: string; }): void

fastdoc-shell:canonical-edit-dropped

notifyCurrentDocumentTruthViewerReady: notifyCurrentDocumentTruthViewerReady(payload: { availability: string; fixtureId: string | null; blockedStatesVisible: boolean; forbiddenClaimsVisible: boolean; unavailableStateVisible: boolean; genericFixtureListVisible: boolean; }): void

fastdoc-shell:current-document-truth-viewer-ready

notifyDocumentRendered: notifyDocumentRendered(renderedPath: string | null): void

fastdoc-shell:document-rendered

notifyEditKeyDropped: notifyEditKeyDropped(payload: { code: string; inputType: string; selectionShape: string; inputRoute: string; contextRefusal: string; pressIndex: number; }): void

fastdoc-shell:edit-key-dropped

notifyPageHydrationDropped: notifyPageHydrationDropped(payload: { code: string; stage: string }): void

fastdoc-shell:page-hydration-dropped

notifyPersistentSaveRefused: notifyPersistentSaveRefused(payload: { code: string; requestId: string; saveAs: boolean; }): void

fastdoc-shell:persistent-save-refused

notifyRendererReady: notifyRendererReady(): void

fastdoc-shell:renderer-ready

notifySmokeCheckpoint: notifySmokeCheckpoint(checkpoint: string, payload?: { screenshotDataUrl?: string | null; screenshots?: Array<{ name?: string | null; dataUrl?: string | null }>; telemetry?: unknown; reserveCyclesCompleted?: number; reserveElapsedMs?: number; reserveRichPayloadBytes?: number; }): void

fastdoc-shell:smoke-checkpoint

notifyUnsavedState: notifyUnsavedState(hasUnsavedChanges: boolean): void

fastdoc-shell:unsaved-state

Listener lifecycle. Каждый on* возвращает unsubscribe () => void; вызывайте при unmount/window teardown.

Ассистент документации

Ответ собран из документации и может быть неточным — сверяйтесь с источниками.