Share via


UiHostEventHandlers interface

The callback for event handling.

Properties

onDocumentClose

Optional. Callback used to notify the host that the user has closed the document. Suggested use: Clean up resources and logging telemetry.

onError

Optional. Callback used to notify the host if an error is encountered after booting the experience. Suggested use: Log diagnostic information and show an error page to the user if the error is fatal.

onReturnFocus

Optional. Callback used to notify host that focus is returned to the host.

Property Details

onDocumentClose

Optional. Callback used to notify the host that the user has closed the document. Suggested use: Clean up resources and logging telemetry.

onDocumentClose?: () => void

Property Value

() => void

onError

Optional. Callback used to notify the host if an error is encountered after booting the experience. Suggested use: Log diagnostic information and show an error page to the user if the error is fatal.

onError?: (error: ErrorInfo) => void

Property Value

(error: ErrorInfo) => void

onReturnFocus

Optional. Callback used to notify host that focus is returned to the host.

onReturnFocus?: (navigateForward?: boolean) => void

Property Value

(navigateForward?: boolean) => void