Class: DesktopBeforeCloseService
Defined in: submodules/univer/packages/ui/src/services/before-close/before-close.service.ts:42
Implements
Constructors
new DesktopBeforeCloseService()
new DesktopBeforeCloseService(_notificationService): DesktopBeforeCloseService
Defined in: submodules/univer/packages/ui/src/services/before-close/before-close.service.ts:46
Parameters
Parameter | Type |
---|---|
_notificationService | INotificationService |
Returns
Methods
registerBeforeClose()
registerBeforeClose(callback): IDisposable
Defined in: submodules/univer/packages/ui/src/services/before-close/before-close.service.ts:50
Provide a callback to check if the web page could be closed safely.
Parameters
Parameter | Type | Description |
---|---|---|
callback | () => undefined | string | The callback to check if the web page could be closed safely. It should return a string to show a message to the user. If the return value is undefined, the web page could be closed safely. |
Returns
Implementation of
IBeforeCloseService
.registerBeforeClose
registerOnClose()
registerOnClose(callback): IDisposable
Defined in: submodules/univer/packages/ui/src/services/before-close/before-close.service.ts:59
Provide a callback to be called when the web page is closed.
Parameters
Parameter | Type | Description |
---|---|---|
callback | () => void | The callback to be called when the web page is closed. |