Theia API Documentation v1.75.0
    Preparing search index...

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    allowVetoes: boolean = true
    closeOnUnload: boolean = false

    Close the window right away when true, else check if we can unload.

    connectionCloseService: ConnectionCloseService
    corePreferences: CorePreferences
    electronWindowPreferences: ElectronWindowPreferences
    frontendApplication: FrontendApplication
    frontendIdProvider: FrontendIdProvider
    isUnloading: boolean = false

    Lock to prevent multiple parallel executions of the beforeunload listener.

    logger: ILogger
    onUnloadEmitter: Emitter<void> = ...
    onWillShutDown: Registration<void, Promise<void>> = ...
    onWillShutDownListeners: ListenerList<void, Promise<void>> = ...
    unloaded: boolean = false

    Accessors

    • get onUnload(): Event<void>

      Fires when the application is shutting down. On this event, the frontend application can save its state and release resource. Saving the state and releasing any resources must be a synchronous call. Any asynchronous calls invoked after emitting this event might be ignored.

      Returns Event<void>

    Methods

    • pagehide also fires when the page enters the back/forward cache, in which case the frontend has already shut down (state saved, connections closed). Reload to get a working application again if the page is restored from the cache. That shutdown already happened, so the reload must not be vetoed by the contributions.

      Parameters

      • event: PageTransitionEvent

      Returns void

    • Checks FrontendApplicationContribution#willStop for impediments to shutdown and runs any actions returned. Can be used safely in browser and Electron when triggering reload or shutdown programmatically. Should only be called before a shutdown - if this returns true, FrontendApplicationContribution#willStop will not be called again in the current session. I.e. if this return true, the shutdown should proceed without further condition.

      Parameters

      Returns Promise<boolean>

    • Will prevent subsequent checks of FrontendApplicationContribution#willStop. Should only be used after requesting user confirmation.

      This is primarily intended programmatic restarts due to e.g. change of display language. It allows for a single confirmation of intent, rather than one warning and then several warnings from other contributions.

      Returns void