Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WorkspacePlatformModule

Controller for a Workspace Platform.

Hierarchy

  • Platform
    • WorkspacePlatformModule

Index

Properties

#private: any
#private: any
Application: Application

The browser window factory for the Workspace Platform.

Layout: LayoutModule

The storage API for the Workspace Platform.

Theme: ThemeApi

Theme API for the Workspace Platform.

addListener: (<EventType>(eventType: EventType, listener: EventHandler<PlatformEvent, EventType>, options?: SubscriptionOptions) => Promise<WorkspacePlatformModule>)

Type declaration

    • <EventType>(eventType: EventType, listener: EventHandler<PlatformEvent, EventType>, options?: SubscriptionOptions): Promise<WorkspacePlatformModule>
    • Type Parameters

      • EventType extends "crashed" | "closed" | "initialized" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "started" | "tray-icon-clicked" | "window-blurred" | "window-certificate-selection-shown" | "window-crashed" | "window-did-change-theme-color" | "window-focused" | "window-navigation-rejected" | "window-url-changed" | "window-did-fail-load" | "window-did-finish-load" | "window-page-favicon-updated" | "window-page-title-updated" | "window-resource-load-failed" | "window-response-received" | "window-child-content-blocked" | "window-child-content-opened-in-browser" | "window-child-view-created" | "window-view-attached" | "window-view-detached" | "window-auth-requested" | "window-begin-user-bounds-changing" | "window-bounds-changed" | "window-bounds-changing" | "window-closed" | "window-closing" | "window-disabled-movement-bounds-changed" | "window-disabled-movement-bounds-changing" | "window-embedded" | "window-end-user-bounds-changing" | "window-external-process-exited" | "window-external-process-started" | "window-hidden" | "window-hotkey" | "window-initialized" | "window-layout-initialized" | "window-layout-ready" | "window-maximized" | "window-minimized" | "window-options-changed" | "window-performance-report" | "window-preload-script-state-changed" | "window-preload-script-state-changing" | "window-reloaded" | "window-restored" | "window-show-requested" | "window-shown" | "window-user-movement-disabled" | "window-user-movement-enabled" | "window-will-move" | "window-will-redirect" | "window-will-resize" | "platform-api-ready" | "platform-snapshot-applied"

      Parameters

      • eventType: EventType
      • listener: EventHandler<PlatformEvent, EventType>
      • Optional options: SubscriptionOptions

      Returns Promise<WorkspacePlatformModule>

deregisterEventListener: ((eventType: "crashed" | "closed" | "initialized" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "started" | "tray-icon-clicked" | "window-blurred" | "window-certificate-selection-shown" | "window-crashed" | "window-did-change-theme-color" | "window-focused" | "window-navigation-rejected" | "window-url-changed" | "window-did-fail-load" | "window-did-finish-load" | "window-page-favicon-updated" | "window-page-title-updated" | "window-resource-load-failed" | "window-response-received" | "window-child-content-blocked" | "window-child-content-opened-in-browser" | "window-child-view-created" | "window-view-attached" | "window-view-detached" | "window-auth-requested" | "window-begin-user-bounds-changing" | "window-bounds-changed" | "window-bounds-changing" | "window-closed" | "window-closing" | "window-disabled-movement-bounds-changed" | "window-disabled-movement-bounds-changing" | "window-embedded" | "window-end-user-bounds-changing" | "window-external-process-exited" | "window-external-process-started" | "window-hidden" | "window-hotkey" | "window-initialized" | "window-layout-initialized" | "window-layout-ready" | "window-maximized" | "window-minimized" | "window-options-changed" | "window-performance-report" | "window-preload-script-state-changed" | "window-preload-script-state-changing" | "window-reloaded" | "window-restored" | "window-show-requested" | "window-shown" | "window-user-movement-disabled" | "window-user-movement-enabled" | "window-will-move" | "window-will-redirect" | "window-will-resize" | "platform-api-ready" | "platform-snapshot-applied", options?: SubscriptionOptions) => Promise<void | EventEmitter>)

Type declaration

    • (eventType: "crashed" | "closed" | "initialized" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "started" | "tray-icon-clicked" | "window-blurred" | "window-certificate-selection-shown" | "window-crashed" | "window-did-change-theme-color" | "window-focused" | "window-navigation-rejected" | "window-url-changed" | "window-did-fail-load" | "window-did-finish-load" | "window-page-favicon-updated" | "window-page-title-updated" | "window-resource-load-failed" | "window-response-received" | "window-child-content-blocked" | "window-child-content-opened-in-browser" | "window-child-view-created" | "window-view-attached" | "window-view-detached" | "window-auth-requested" | "window-begin-user-bounds-changing" | "window-bounds-changed" | "window-bounds-changing" | "window-closed" | "window-closing" | "window-disabled-movement-bounds-changed" | "window-disabled-movement-bounds-changing" | "window-embedded" | "window-end-user-bounds-changing" | "window-external-process-exited" | "window-external-process-started" | "window-hidden" | "window-hotkey" | "window-initialized" | "window-layout-initialized" | "window-layout-ready" | "window-maximized" | "window-minimized" | "window-options-changed" | "window-performance-report" | "window-preload-script-state-changed" | "window-preload-script-state-changing" | "window-reloaded" | "window-restored" | "window-show-requested" | "window-shown" | "window-user-movement-disabled" | "window-user-movement-enabled" | "window-will-move" | "window-will-redirect" | "window-will-resize" | "platform-api-ready" | "platform-snapshot-applied", options?: SubscriptionOptions): Promise<void | EventEmitter>
    • Parameters

      • eventType: "crashed" | "closed" | "initialized" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "started" | "tray-icon-clicked" | "window-blurred" | "window-certificate-selection-shown" | "window-crashed" | "window-did-change-theme-color" | "window-focused" | "window-navigation-rejected" | "window-url-changed" | "window-did-fail-load" | "window-did-finish-load" | "window-page-favicon-updated" | "window-page-title-updated" | "window-resource-load-failed" | "window-response-received" | "window-child-content-blocked" | "window-child-content-opened-in-browser" | "window-child-view-created" | "window-view-attached" | "window-view-detached" | "window-auth-requested" | "window-begin-user-bounds-changing" | "window-bounds-changed" | "window-bounds-changing" | "window-closed" | "window-closing" | "window-disabled-movement-bounds-changed" | "window-disabled-movement-bounds-changing" | "window-embedded" | "window-end-user-bounds-changing" | "window-external-process-exited" | "window-external-process-started" | "window-hidden" | "window-hotkey" | "window-initialized" | "window-layout-initialized" | "window-layout-ready" | "window-maximized" | "window-minimized" | "window-options-changed" | "window-performance-report" | "window-preload-script-state-changed" | "window-preload-script-state-changing" | "window-reloaded" | "window-restored" | "window-show-requested" | "window-shown" | "window-user-movement-disabled" | "window-user-movement-enabled" | "window-will-move" | "window-will-redirect" | "window-will-resize" | "platform-api-ready" | "platform-snapshot-applied"
      • Optional options: SubscriptionOptions

      Returns Promise<void | EventEmitter>

emit: (<EventType>(eventType: EventType, payload: Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { details: { exitCode: number; reason: string }; exitCode: number; reason: "crashed" | "normal-termination" | "abnormal-termination" | "killed" | "still-running" | "launch-failed" | "out-of-memory" | "integrity-failure"; type: "crashed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "blurred" }, "type"> & { type: "view-blurred" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { certificates: Certificate[]; type: "certificate-selection-shown"; url: string }, "type"> & { type: "view-certificate-selection-shown" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { details: { exitCode: number; reason: string }; exitCode: number; reason: "crashed" | "normal-termination" | "abnormal-termination" | "killed" | "still-running" | "launch-failed" | "out-of-memory" | "integrity-failure"; type: "crashed" }, "type"> & { type: "view-crashed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "did-change-theme-color" }, "type"> & { type: "view-did-change-theme-color" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "focused" }, "type"> & { type: "view-focused" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { sourceName?: string; type: "navigation-rejected"; url: string }, "type"> & { type: "view-navigation-rejected" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "url-changed"; url: string } & { isInPage: true }, "type"> & { type: "view-url-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "url-changed"; url: string } & { httpResponseCode: number; httpStatusText: string; isInPage: false }, "type"> & { type: "view-url-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { errorCode: number; errorDescription: string; isMainFrame: boolean; validatedURL: string } & { type: "did-fail-load" }, "type"> & { type: "view-did-fail-load" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "did-finish-load" }, "type"> & { type: "view-did-finish-load" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { favicons: string[]; type: "page-favicon-updated" }, "type"> & { type: "view-page-favicon-updated" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { title: string; type: "page-title-updated" }, "type"> & { type: "view-page-title-updated" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { errorCode: number; errorDescription: string; isMainFrame: boolean; validatedURL: string } & { type: "resource-load-failed" }, "type"> & { type: "view-resource-load-failed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { headers: any; httpResponseCode: number; newUrl: string; originalUrl: string; referrer: string; requestMethod: string; resourceType: "object" | "script" | "mainFrame" | "subFrame" | "styleSheet" | "image" | "xhr" | "other"; status: boolean; type: "response-received" }, "type"> & { type: "view-response-received" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "child-content-blocked" }, "type"> & { type: "view-child-content-blocked" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "child-content-opened-in-browser" }, "type"> & { type: "view-child-content-opened-in-browser" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "child-view-created" }, "type"> & { type: "view-child-view-created" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "attached" }, "type"> & { type: "view-attached" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "created" }, "type"> & { type: "view-created" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "destroyed" }, "type"> & { type: "view-destroyed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "hidden" }, "type"> & { type: "view-hidden" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "hotkey" }, "type"> & { type: "view-hotkey" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "shown" }, "type"> & { type: "view-shown" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { previousTarget: Identity; type: "target-changed" }, "type"> & { type: "view-target-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BlurredEvent, "type"> & { type: "window-blurred" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<CertificateSelectionShownEvent, "type"> & { type: "window-certificate-selection-shown" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<CrashedEvent, "type"> & { type: "window-crashed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<DidChangeThemeColorEvent, "type"> & { type: "window-did-change-theme-color" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<FocusedEvent, "type"> & { type: "window-focused" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<NavigationRejectedEvent, "type"> & { type: "window-navigation-rejected" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseEvent & { uuid: string } & { name: string } & { type: "url-changed"; url: string } & { isInPage: true }, "type"> & { type: "window-url-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseEvent & { uuid: string } & { name: string } & { type: "url-changed"; url: string } & { httpResponseCode: number; httpStatusText: string; isInPage: false }, "type"> & { type: "window-url-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<DidFailLoadEvent, "type"> & { type: "window-did-fail-load" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<DidFinishLoadEvent, "type"> & { type: "window-did-finish-load" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<FaviconUpdatedEvent, "type"> & { type: "window-page-favicon-updated" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<PageTitleUpdatedEvent, "type"> & { type: "window-page-title-updated" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ResourceLoadFailedEvent, "type"> & { type: "window-resource-load-failed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ResourceResponseReceivedEvent, "type"> & { type: "window-response-received" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ChildContentBlockedEvent, "type"> & { type: "window-child-content-blocked" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ChildContentOpenedInBrowserEvent, "type"> & { type: "window-child-content-opened-in-browser" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ChildViewCreatedEvent, "type"> & { type: "window-child-view-created" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<Omit<AttachedEvent, "type"> & { type: "view-attached" }, "type"> & { type: "window-view-attached" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ViewDetachedEvent, "type"> & { type: "window-view-detached" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<AuthRequestedEvent, "type"> & { type: "window-auth-requested" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BeginUserBoundsChangingEvent, "type"> & { type: "window-begin-user-bounds-changing" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BoundsChangedEvent, "type"> & { type: "window-bounds-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BoundsChangingEvent, "type"> & { type: "window-bounds-changing" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowClosedEvent, "type"> & { type: "window-closed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowClosingEvent, "type"> & { type: "window-closing" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<DisabledMovementBoundsChangedEvent, "type"> & { type: "window-disabled-movement-bounds-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<DisabledMovementBoundsChangingEvent, "type"> & { type: "window-disabled-movement-bounds-changing" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<EmbeddedEvent, "type"> & { type: "window-embedded" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<EndUserBoundsChangingEvent, "type"> & { type: "window-end-user-bounds-changing" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ExternalProcessExitedEvent, "type"> & { type: "window-external-process-exited" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ExternalProcessStartedEvent, "type"> & { type: "window-external-process-started" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<HiddenEvent, "type"> & { type: "window-hidden" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowHotkeyEvent, "type"> & { type: "window-hotkey" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowInitializedEvent, "type"> & { type: "window-initialized" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<LayoutInitializedEvent, "type"> & { type: "window-layout-initialized" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<LayoutReadyEvent, "type"> & { type: "window-layout-ready" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<MaximizedEvent, "type"> & { type: "window-maximized" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<MinimizedEvent, "type"> & { type: "window-minimized" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowOptionsChangedEvent, "type"> & { type: "window-options-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<PerformanceReportEvent, "type"> & { type: "window-performance-report" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<PreloadScriptsStateChangedEvent, "type"> & { type: "window-preload-script-state-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<PreloadScriptsStateChangingEvent, "type"> & { type: "window-preload-script-state-changing" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ReloadedEvent, "type"> & { type: "window-reloaded" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowRestoredEvent, "type"> & { type: "window-restored" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowShowRequestedEvent, "type"> & { type: "window-show-requested" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowShownEvent, "type"> & { type: "window-shown" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<UserMovementDisabledEvent, "type"> & { type: "window-user-movement-disabled" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<UserMovementEnabledEvent, "type"> & { type: "window-user-movement-enabled" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WillMoveEvent, "type"> & { type: "window-will-move" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WillRedirectEvent, "type"> & { type: "window-will-redirect" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WillResizeEvent, "type"> & { type: "window-will-resize" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { type: "window-alert-requested" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { type: "window-created" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { type: "window-end-load" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { type: "window-not-responding" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { type: "window-responding" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { type: "window-start-load" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "closed" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "connected" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "initialized" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "manifest-changed" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "not-responding" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "responding" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { manifest: ManifestInfo; type: "run-requested"; userAppConfigArgs: Record<string, any> }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "started" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { bounds: Rectangle; button: 0 | 2 | 1; monitorInfo: any; type: "tray-icon-clicked"; x: number; y: number }, { type: EventType }> | Extract<PlatformApiReadyEvent, { type: EventType }> | Extract<PlatformSnapshotAppliedEvent, { type: EventType }>, ...args: any[]) => boolean)

Type declaration

    • <EventType>(eventType: EventType, payload: Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { details: { exitCode: number; reason: string }; exitCode: number; reason: "crashed" | "normal-termination" | "abnormal-termination" | "killed" | "still-running" | "launch-failed" | "out-of-memory" | "integrity-failure"; type: "crashed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "blurred" }, "type"> & { type: "view-blurred" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { certificates: Certificate[]; type: "certificate-selection-shown"; url: string }, "type"> & { type: "view-certificate-selection-shown" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { details: { exitCode: number; reason: string }; exitCode: number; reason: "crashed" | "normal-termination" | "abnormal-termination" | "killed" | "still-running" | "launch-failed" | "out-of-memory" | "integrity-failure"; type: "crashed" }, "type"> & { type: "view-crashed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "did-change-theme-color" }, "type"> & { type: "view-did-change-theme-color" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "focused" }, "type"> & { type: "view-focused" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { sourceName?: string; type: "navigation-rejected"; url: string }, "type"> & { type: "view-navigation-rejected" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "url-changed"; url: string } & { isInPage: true }, "type"> & { type: "view-url-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "url-changed"; url: string } & { httpResponseCode: number; httpStatusText: string; isInPage: false }, "type"> & { type: "view-url-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { errorCode: number; errorDescription: string; isMainFrame: boolean; validatedURL: string } & { type: "did-fail-load" }, "type"> & { type: "view-did-fail-load" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "did-finish-load" }, "type"> & { type: "view-did-finish-load" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { favicons: string[]; type: "page-favicon-updated" }, "type"> & { type: "view-page-favicon-updated" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { title: string; type: "page-title-updated" }, "type"> & { type: "view-page-title-updated" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { errorCode: number; errorDescription: string; isMainFrame: boolean; validatedURL: string } & { type: "resource-load-failed" }, "type"> & { type: "view-resource-load-failed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { headers: any; httpResponseCode: number; newUrl: string; originalUrl: string; referrer: string; requestMethod: string; resourceType: "object" | "script" | "mainFrame" | "subFrame" | "styleSheet" | "image" | "xhr" | "other"; status: boolean; type: "response-received" }, "type"> & { type: "view-response-received" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "child-content-blocked" }, "type"> & { type: "view-child-content-blocked" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "child-content-opened-in-browser" }, "type"> & { type: "view-child-content-opened-in-browser" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "child-view-created" }, "type"> & { type: "view-child-view-created" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "attached" }, "type"> & { type: "view-attached" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "created" }, "type"> & { type: "view-created" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "destroyed" }, "type"> & { type: "view-destroyed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "hidden" }, "type"> & { type: "view-hidden" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "hotkey" }, "type"> & { type: "view-hotkey" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "shown" }, "type"> & { type: "view-shown" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { previousTarget: Identity; type: "target-changed" }, "type"> & { type: "view-target-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BlurredEvent, "type"> & { type: "window-blurred" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<CertificateSelectionShownEvent, "type"> & { type: "window-certificate-selection-shown" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<CrashedEvent, "type"> & { type: "window-crashed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<DidChangeThemeColorEvent, "type"> & { type: "window-did-change-theme-color" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<FocusedEvent, "type"> & { type: "window-focused" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<NavigationRejectedEvent, "type"> & { type: "window-navigation-rejected" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseEvent & { uuid: string } & { name: string } & { type: "url-changed"; url: string } & { isInPage: true }, "type"> & { type: "window-url-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseEvent & { uuid: string } & { name: string } & { type: "url-changed"; url: string } & { httpResponseCode: number; httpStatusText: string; isInPage: false }, "type"> & { type: "window-url-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<DidFailLoadEvent, "type"> & { type: "window-did-fail-load" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<DidFinishLoadEvent, "type"> & { type: "window-did-finish-load" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<FaviconUpdatedEvent, "type"> & { type: "window-page-favicon-updated" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<PageTitleUpdatedEvent, "type"> & { type: "window-page-title-updated" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ResourceLoadFailedEvent, "type"> & { type: "window-resource-load-failed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ResourceResponseReceivedEvent, "type"> & { type: "window-response-received" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ChildContentBlockedEvent, "type"> & { type: "window-child-content-blocked" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ChildContentOpenedInBrowserEvent, "type"> & { type: "window-child-content-opened-in-browser" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ChildViewCreatedEvent, "type"> & { type: "window-child-view-created" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<Omit<AttachedEvent, "type"> & { type: "view-attached" }, "type"> & { type: "window-view-attached" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ViewDetachedEvent, "type"> & { type: "window-view-detached" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<AuthRequestedEvent, "type"> & { type: "window-auth-requested" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BeginUserBoundsChangingEvent, "type"> & { type: "window-begin-user-bounds-changing" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BoundsChangedEvent, "type"> & { type: "window-bounds-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BoundsChangingEvent, "type"> & { type: "window-bounds-changing" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowClosedEvent, "type"> & { type: "window-closed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowClosingEvent, "type"> & { type: "window-closing" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<DisabledMovementBoundsChangedEvent, "type"> & { type: "window-disabled-movement-bounds-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<DisabledMovementBoundsChangingEvent, "type"> & { type: "window-disabled-movement-bounds-changing" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<EmbeddedEvent, "type"> & { type: "window-embedded" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<EndUserBoundsChangingEvent, "type"> & { type: "window-end-user-bounds-changing" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ExternalProcessExitedEvent, "type"> & { type: "window-external-process-exited" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ExternalProcessStartedEvent, "type"> & { type: "window-external-process-started" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<HiddenEvent, "type"> & { type: "window-hidden" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowHotkeyEvent, "type"> & { type: "window-hotkey" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowInitializedEvent, "type"> & { type: "window-initialized" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<LayoutInitializedEvent, "type"> & { type: "window-layout-initialized" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<LayoutReadyEvent, "type"> & { type: "window-layout-ready" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<MaximizedEvent, "type"> & { type: "window-maximized" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<MinimizedEvent, "type"> & { type: "window-minimized" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowOptionsChangedEvent, "type"> & { type: "window-options-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<PerformanceReportEvent, "type"> & { type: "window-performance-report" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<PreloadScriptsStateChangedEvent, "type"> & { type: "window-preload-script-state-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<PreloadScriptsStateChangingEvent, "type"> & { type: "window-preload-script-state-changing" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ReloadedEvent, "type"> & { type: "window-reloaded" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowRestoredEvent, "type"> & { type: "window-restored" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowShowRequestedEvent, "type"> & { type: "window-show-requested" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowShownEvent, "type"> & { type: "window-shown" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<UserMovementDisabledEvent, "type"> & { type: "window-user-movement-disabled" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<UserMovementEnabledEvent, "type"> & { type: "window-user-movement-enabled" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WillMoveEvent, "type"> & { type: "window-will-move" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WillRedirectEvent, "type"> & { type: "window-will-redirect" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WillResizeEvent, "type"> & { type: "window-will-resize" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { type: "window-alert-requested" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { type: "window-created" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { type: "window-end-load" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { type: "window-not-responding" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { type: "window-responding" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { type: "window-start-load" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "closed" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "connected" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "initialized" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "manifest-changed" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "not-responding" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "responding" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { manifest: ManifestInfo; type: "run-requested"; userAppConfigArgs: Record<string, any> }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "started" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { bounds: Rectangle; button: 0 | 2 | 1; monitorInfo: any; type: "tray-icon-clicked"; x: number; y: number }, { type: EventType }> | Extract<PlatformApiReadyEvent, { type: EventType }> | Extract<PlatformSnapshotAppliedEvent, { type: EventType }>, ...args: any[]): boolean
    • Type Parameters

      • EventType extends "crashed" | "closed" | "initialized" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "started" | "tray-icon-clicked" | "window-blurred" | "window-certificate-selection-shown" | "window-crashed" | "window-did-change-theme-color" | "window-focused" | "window-navigation-rejected" | "window-url-changed" | "window-did-fail-load" | "window-did-finish-load" | "window-page-favicon-updated" | "window-page-title-updated" | "window-resource-load-failed" | "window-response-received" | "window-child-content-blocked" | "window-child-content-opened-in-browser" | "window-child-view-created" | "window-view-attached" | "window-view-detached" | "window-auth-requested" | "window-begin-user-bounds-changing" | "window-bounds-changed" | "window-bounds-changing" | "window-closed" | "window-closing" | "window-disabled-movement-bounds-changed" | "window-disabled-movement-bounds-changing" | "window-embedded" | "window-end-user-bounds-changing" | "window-external-process-exited" | "window-external-process-started" | "window-hidden" | "window-hotkey" | "window-initialized" | "window-layout-initialized" | "window-layout-ready" | "window-maximized" | "window-minimized" | "window-options-changed" | "window-performance-report" | "window-preload-script-state-changed" | "window-preload-script-state-changing" | "window-reloaded" | "window-restored" | "window-show-requested" | "window-shown" | "window-user-movement-disabled" | "window-user-movement-enabled" | "window-will-move" | "window-will-redirect" | "window-will-resize" | "platform-api-ready" | "platform-snapshot-applied"

      Parameters

      • eventType: EventType
      • payload: Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { details: { exitCode: number; reason: string }; exitCode: number; reason: "crashed" | "normal-termination" | "abnormal-termination" | "killed" | "still-running" | "launch-failed" | "out-of-memory" | "integrity-failure"; type: "crashed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "blurred" }, "type"> & { type: "view-blurred" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { certificates: Certificate[]; type: "certificate-selection-shown"; url: string }, "type"> & { type: "view-certificate-selection-shown" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { details: { exitCode: number; reason: string }; exitCode: number; reason: "crashed" | "normal-termination" | "abnormal-termination" | "killed" | "still-running" | "launch-failed" | "out-of-memory" | "integrity-failure"; type: "crashed" }, "type"> & { type: "view-crashed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "did-change-theme-color" }, "type"> & { type: "view-did-change-theme-color" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "focused" }, "type"> & { type: "view-focused" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { sourceName?: string; type: "navigation-rejected"; url: string }, "type"> & { type: "view-navigation-rejected" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "url-changed"; url: string } & { isInPage: true }, "type"> & { type: "view-url-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "url-changed"; url: string } & { httpResponseCode: number; httpStatusText: string; isInPage: false }, "type"> & { type: "view-url-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { errorCode: number; errorDescription: string; isMainFrame: boolean; validatedURL: string } & { type: "did-fail-load" }, "type"> & { type: "view-did-fail-load" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "did-finish-load" }, "type"> & { type: "view-did-finish-load" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { favicons: string[]; type: "page-favicon-updated" }, "type"> & { type: "view-page-favicon-updated" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { title: string; type: "page-title-updated" }, "type"> & { type: "view-page-title-updated" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { errorCode: number; errorDescription: string; isMainFrame: boolean; validatedURL: string } & { type: "resource-load-failed" }, "type"> & { type: "view-resource-load-failed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { headers: any; httpResponseCode: number; newUrl: string; originalUrl: string; referrer: string; requestMethod: string; resourceType: "object" | "script" | "mainFrame" | "subFrame" | "styleSheet" | "image" | "xhr" | "other"; status: boolean; type: "response-received" }, "type"> & { type: "view-response-received" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "child-content-blocked" }, "type"> & { type: "view-child-content-blocked" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "child-content-opened-in-browser" }, "type"> & { type: "view-child-content-opened-in-browser" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "child-view-created" }, "type"> & { type: "view-child-view-created" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "attached" }, "type"> & { type: "view-attached" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "created" }, "type"> & { type: "view-created" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "destroyed" }, "type"> & { type: "view-destroyed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "hidden" }, "type"> & { type: "view-hidden" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "hotkey" }, "type"> & { type: "view-hotkey" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { type: "shown" }, "type"> & { type: "view-shown" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseViewEvent & BaseEvent & { uuid: string } & { name: string } & { previousTarget: Identity; type: "target-changed" }, "type"> & { type: "view-target-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BlurredEvent, "type"> & { type: "window-blurred" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<CertificateSelectionShownEvent, "type"> & { type: "window-certificate-selection-shown" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<CrashedEvent, "type"> & { type: "window-crashed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<DidChangeThemeColorEvent, "type"> & { type: "window-did-change-theme-color" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<FocusedEvent, "type"> & { type: "window-focused" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<NavigationRejectedEvent, "type"> & { type: "window-navigation-rejected" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseEvent & { uuid: string } & { name: string } & { type: "url-changed"; url: string } & { isInPage: true }, "type"> & { type: "window-url-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BaseEvent & { uuid: string } & { name: string } & { type: "url-changed"; url: string } & { httpResponseCode: number; httpStatusText: string; isInPage: false }, "type"> & { type: "window-url-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<DidFailLoadEvent, "type"> & { type: "window-did-fail-load" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<DidFinishLoadEvent, "type"> & { type: "window-did-finish-load" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<FaviconUpdatedEvent, "type"> & { type: "window-page-favicon-updated" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<PageTitleUpdatedEvent, "type"> & { type: "window-page-title-updated" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ResourceLoadFailedEvent, "type"> & { type: "window-resource-load-failed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ResourceResponseReceivedEvent, "type"> & { type: "window-response-received" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ChildContentBlockedEvent, "type"> & { type: "window-child-content-blocked" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ChildContentOpenedInBrowserEvent, "type"> & { type: "window-child-content-opened-in-browser" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ChildViewCreatedEvent, "type"> & { type: "window-child-view-created" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<Omit<AttachedEvent, "type"> & { type: "view-attached" }, "type"> & { type: "window-view-attached" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ViewDetachedEvent, "type"> & { type: "window-view-detached" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<AuthRequestedEvent, "type"> & { type: "window-auth-requested" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BeginUserBoundsChangingEvent, "type"> & { type: "window-begin-user-bounds-changing" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BoundsChangedEvent, "type"> & { type: "window-bounds-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<BoundsChangingEvent, "type"> & { type: "window-bounds-changing" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowClosedEvent, "type"> & { type: "window-closed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowClosingEvent, "type"> & { type: "window-closing" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<DisabledMovementBoundsChangedEvent, "type"> & { type: "window-disabled-movement-bounds-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<DisabledMovementBoundsChangingEvent, "type"> & { type: "window-disabled-movement-bounds-changing" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<EmbeddedEvent, "type"> & { type: "window-embedded" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<EndUserBoundsChangingEvent, "type"> & { type: "window-end-user-bounds-changing" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ExternalProcessExitedEvent, "type"> & { type: "window-external-process-exited" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ExternalProcessStartedEvent, "type"> & { type: "window-external-process-started" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<HiddenEvent, "type"> & { type: "window-hidden" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowHotkeyEvent, "type"> & { type: "window-hotkey" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowInitializedEvent, "type"> & { type: "window-initialized" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<LayoutInitializedEvent, "type"> & { type: "window-layout-initialized" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<LayoutReadyEvent, "type"> & { type: "window-layout-ready" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<MaximizedEvent, "type"> & { type: "window-maximized" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<MinimizedEvent, "type"> & { type: "window-minimized" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowOptionsChangedEvent, "type"> & { type: "window-options-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<PerformanceReportEvent, "type"> & { type: "window-performance-report" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<PreloadScriptsStateChangedEvent, "type"> & { type: "window-preload-script-state-changed" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<PreloadScriptsStateChangingEvent, "type"> & { type: "window-preload-script-state-changing" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<ReloadedEvent, "type"> & { type: "window-reloaded" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowRestoredEvent, "type"> & { type: "window-restored" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowShowRequestedEvent, "type"> & { type: "window-show-requested" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WindowShownEvent, "type"> & { type: "window-shown" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<UserMovementDisabledEvent, "type"> & { type: "window-user-movement-disabled" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<UserMovementEnabledEvent, "type"> & { type: "window-user-movement-enabled" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WillMoveEvent, "type"> & { type: "window-will-move" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WillRedirectEvent, "type"> & { type: "window-will-redirect" }, { type: EventType }> | Extract<{ topic: "application" } & Omit<WillResizeEvent, "type"> & { type: "window-will-resize" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { type: "window-alert-requested" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { type: "window-created" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { type: "window-end-load" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { type: "window-not-responding" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { type: "window-responding" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { name: string } & { type: "window-start-load" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "closed" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "connected" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "initialized" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "manifest-changed" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "not-responding" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "responding" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { manifest: ManifestInfo; type: "run-requested"; userAppConfigArgs: Record<string, any> }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { type: "started" }, { type: EventType }> | Extract<{ topic: "application" } & BaseEvent & { uuid: string } & { bounds: Rectangle; button: 0 | 2 | 1; monitorInfo: any; type: "tray-icon-clicked"; x: number; y: number }, { type: EventType }> | Extract<PlatformApiReadyEvent, { type: EventType }> | Extract<PlatformSnapshotAppliedEvent, { type: EventType }>
      • Rest ...args: any[]

      Returns boolean

eventNames: (() => (string | symbol)[])

Type declaration

    • (): (string | symbol)[]
    • Returns (string | symbol)[]

getClient: ((identity?: ApplicationIdentity) => Promise<default>)

Type declaration

    • (identity?: ApplicationIdentity): Promise<default>
    • Parameters

      • Optional identity: ApplicationIdentity

      Returns Promise<default>

identity: ApplicationIdentity
isBrowserEnvironment: (() => boolean)

Type declaration

    • (): boolean
    • Returns boolean

isNodeEnvironment: (() => boolean)

Type declaration

    • (): boolean
    • Returns boolean

isOpenFinEnvironment: (() => boolean)

Type declaration

    • (): boolean
    • Returns boolean

launchLegacyManifest: ((manifestUrl: string) => Promise<Platform>)

Type declaration

    • (manifestUrl: string): Promise<Platform>
    • Parameters

      • manifestUrl: string

      Returns Promise<Platform>

listenerCount: ((type: string | symbol) => number)

Type declaration

    • (type: string | symbol): number
    • Parameters

      • type: string | symbol

      Returns number

listeners: ((type: string | symbol) => Function[])

Type declaration

    • (type: string | symbol): Function[]
    • Parameters

      • type: string | symbol

      Returns Function[]

registerEventListener: ((eventType: "crashed" | "closed" | "initialized" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "started" | "tray-icon-clicked" | "window-blurred" | "window-certificate-selection-shown" | "window-crashed" | "window-did-change-theme-color" | "window-focused" | "window-navigation-rejected" | "window-url-changed" | "window-did-fail-load" | "window-did-finish-load" | "window-page-favicon-updated" | "window-page-title-updated" | "window-resource-load-failed" | "window-response-received" | "window-child-content-blocked" | "window-child-content-opened-in-browser" | "window-child-view-created" | "window-view-attached" | "window-view-detached" | "window-auth-requested" | "window-begin-user-bounds-changing" | "window-bounds-changed" | "window-bounds-changing" | "window-closed" | "window-closing" | "window-disabled-movement-bounds-changed" | "window-disabled-movement-bounds-changing" | "window-embedded" | "window-end-user-bounds-changing" | "window-external-process-exited" | "window-external-process-started" | "window-hidden" | "window-hotkey" | "window-initialized" | "window-layout-initialized" | "window-layout-ready" | "window-maximized" | "window-minimized" | "window-options-changed" | "window-performance-report" | "window-preload-script-state-changed" | "window-preload-script-state-changing" | "window-reloaded" | "window-restored" | "window-show-requested" | "window-shown" | "window-user-movement-disabled" | "window-user-movement-enabled" | "window-will-move" | "window-will-redirect" | "window-will-resize" | "platform-api-ready" | "platform-snapshot-applied", options: SubscriptionOptions, applySubscription: ((emitter: EventEmitter) => void), undoSubscription: ((emitter: EventEmitter) => void)) => Promise<void>)

Type declaration

    • (eventType: "crashed" | "closed" | "initialized" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "started" | "tray-icon-clicked" | "window-blurred" | "window-certificate-selection-shown" | "window-crashed" | "window-did-change-theme-color" | "window-focused" | "window-navigation-rejected" | "window-url-changed" | "window-did-fail-load" | "window-did-finish-load" | "window-page-favicon-updated" | "window-page-title-updated" | "window-resource-load-failed" | "window-response-received" | "window-child-content-blocked" | "window-child-content-opened-in-browser" | "window-child-view-created" | "window-view-attached" | "window-view-detached" | "window-auth-requested" | "window-begin-user-bounds-changing" | "window-bounds-changed" | "window-bounds-changing" | "window-closed" | "window-closing" | "window-disabled-movement-bounds-changed" | "window-disabled-movement-bounds-changing" | "window-embedded" | "window-end-user-bounds-changing" | "window-external-process-exited" | "window-external-process-started" | "window-hidden" | "window-hotkey" | "window-initialized" | "window-layout-initialized" | "window-layout-ready" | "window-maximized" | "window-minimized" | "window-options-changed" | "window-performance-report" | "window-preload-script-state-changed" | "window-preload-script-state-changing" | "window-reloaded" | "window-restored" | "window-show-requested" | "window-shown" | "window-user-movement-disabled" | "window-user-movement-enabled" | "window-will-move" | "window-will-redirect" | "window-will-resize" | "platform-api-ready" | "platform-snapshot-applied", options: SubscriptionOptions, applySubscription: ((emitter: EventEmitter) => void), undoSubscription: ((emitter: EventEmitter) => void)): Promise<void>
    • Parameters

      • eventType: "crashed" | "closed" | "initialized" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "started" | "tray-icon-clicked" | "window-blurred" | "window-certificate-selection-shown" | "window-crashed" | "window-did-change-theme-color" | "window-focused" | "window-navigation-rejected" | "window-url-changed" | "window-did-fail-load" | "window-did-finish-load" | "window-page-favicon-updated" | "window-page-title-updated" | "window-resource-load-failed" | "window-response-received" | "window-child-content-blocked" | "window-child-content-opened-in-browser" | "window-child-view-created" | "window-view-attached" | "window-view-detached" | "window-auth-requested" | "window-begin-user-bounds-changing" | "window-bounds-changed" | "window-bounds-changing" | "window-closed" | "window-closing" | "window-disabled-movement-bounds-changed" | "window-disabled-movement-bounds-changing" | "window-embedded" | "window-end-user-bounds-changing" | "window-external-process-exited" | "window-external-process-started" | "window-hidden" | "window-hotkey" | "window-initialized" | "window-layout-initialized" | "window-layout-ready" | "window-maximized" | "window-minimized" | "window-options-changed" | "window-performance-report" | "window-preload-script-state-changed" | "window-preload-script-state-changing" | "window-reloaded" | "window-restored" | "window-show-requested" | "window-shown" | "window-user-movement-disabled" | "window-user-movement-enabled" | "window-will-move" | "window-will-redirect" | "window-will-resize" | "platform-api-ready" | "platform-snapshot-applied"
      • options: SubscriptionOptions
      • applySubscription: ((emitter: EventEmitter) => void)
          • (emitter: EventEmitter): void
          • Parameters

            • emitter: EventEmitter

            Returns void

      • undoSubscription: ((emitter: EventEmitter) => void)
          • (emitter: EventEmitter): void
          • Parameters

            • emitter: EventEmitter

            Returns void

      Returns Promise<void>

wire: Transport<EntityType>

Accessors

  • get fin(): default<EntityType>
  • Returns default<EntityType>

  • get me(): Identity
  • Returns Identity

Methods

  • applySnapshot(snapshot: string | BrowserSnapshot, options?: ApplySnapshotOptions): Promise<Platform>
  • Launch a browser snapshot that contains windows with pages.

    Parameters

    • snapshot: string | BrowserSnapshot

      the browser snapshot to launch or a url or filepath to retrieve a JSON snapshot.

    • Optional options: ApplySnapshotOptions

    Returns Promise<Platform>

  • applyWorkspace(workspace: Workspace): Promise<void>
  • Closes content from the current workspace and applies the given workspace to the user's desktop. Makes that workspace the active workspace.

    Parameters

    • workspace: Workspace

      the workspace to apply to the desktop and set as the current active workspace.

    Returns Promise<void>

  • closeView(viewIdentity: Identity): Promise<void>
  • Closes a specified view in a target window.

    tutorial

    Platform.closeView

    Parameters

    • viewIdentity: Identity

      View identity

    Returns Promise<void>

  • closeWindow(windowId: Identity, options?: { skipBeforeUnload: boolean }): Promise<void>
  • Closes a window. If enableBeforeUnload is enabled in the Platform options, any beforeunload handler set on Views will fire This behavior can be disabled by setting skipBeforeUnload to false in the options parameter.

    tutorial

    Platform.closeWindow

    experimental

    Parameters

    • windowId: Identity
    • Optional options: { skipBeforeUnload: boolean }
      • skipBeforeUnload: boolean

    Returns Promise<void>

  • createView(viewOptions: Partial<ViewOptions>, target?: CreateViewTarget, targetView?: Identity): Promise<View>
  • Creates a new view and attaches it to a specified target window.

    tutorial

    Platform.createView

    Parameters

    • viewOptions: Partial<ViewOptions>

      View creation options

    • Optional target: CreateViewTarget
    • Optional targetView: Identity

    Returns Promise<View>

  • createWindow(options: PlatformWindowCreationOptions): Promise<_Window & Identity>
  • Creates a new Window.

    tutorial

    Platform.createWindow

    Parameters

    • options: PlatformWindowCreationOptions

      Window creation options

    Returns Promise<_Window & Identity>

  • deregisterAllListeners(eventType: "crashed" | "closed" | "initialized" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "started" | "tray-icon-clicked" | "window-blurred" | "window-certificate-selection-shown" | "window-crashed" | "window-did-change-theme-color" | "window-focused" | "window-navigation-rejected" | "window-url-changed" | "window-did-fail-load" | "window-did-finish-load" | "window-page-favicon-updated" | "window-page-title-updated" | "window-resource-load-failed" | "window-response-received" | "window-child-content-blocked" | "window-child-content-opened-in-browser" | "window-child-view-created" | "window-view-attached" | "window-view-detached" | "window-auth-requested" | "window-begin-user-bounds-changing" | "window-bounds-changed" | "window-bounds-changing" | "window-closed" | "window-closing" | "window-disabled-movement-bounds-changed" | "window-disabled-movement-bounds-changing" | "window-embedded" | "window-end-user-bounds-changing" | "window-external-process-exited" | "window-external-process-started" | "window-hidden" | "window-hotkey" | "window-initialized" | "window-layout-initialized" | "window-layout-ready" | "window-maximized" | "window-minimized" | "window-options-changed" | "window-performance-report" | "window-preload-script-state-changed" | "window-preload-script-state-changing" | "window-reloaded" | "window-restored" | "window-show-requested" | "window-shown" | "window-user-movement-disabled" | "window-user-movement-enabled" | "window-will-move" | "window-will-redirect" | "window-will-resize" | "platform-api-ready" | "platform-snapshot-applied"): Promise<void | EventEmitter>
  • Parameters

    • eventType: "crashed" | "closed" | "initialized" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "started" | "tray-icon-clicked" | "window-blurred" | "window-certificate-selection-shown" | "window-crashed" | "window-did-change-theme-color" | "window-focused" | "window-navigation-rejected" | "window-url-changed" | "window-did-fail-load" | "window-did-finish-load" | "window-page-favicon-updated" | "window-page-title-updated" | "window-resource-load-failed" | "window-response-received" | "window-child-content-blocked" | "window-child-content-opened-in-browser" | "window-child-view-created" | "window-view-attached" | "window-view-detached" | "window-auth-requested" | "window-begin-user-bounds-changing" | "window-bounds-changed" | "window-bounds-changing" | "window-closed" | "window-closing" | "window-disabled-movement-bounds-changed" | "window-disabled-movement-bounds-changing" | "window-embedded" | "window-end-user-bounds-changing" | "window-external-process-exited" | "window-external-process-started" | "window-hidden" | "window-hotkey" | "window-initialized" | "window-layout-initialized" | "window-layout-ready" | "window-maximized" | "window-minimized" | "window-options-changed" | "window-performance-report" | "window-preload-script-state-changed" | "window-preload-script-state-changing" | "window-reloaded" | "window-restored" | "window-show-requested" | "window-shown" | "window-user-movement-disabled" | "window-user-movement-enabled" | "window-will-move" | "window-will-redirect" | "window-will-resize" | "platform-api-ready" | "platform-snapshot-applied"

    Returns Promise<void | EventEmitter>

  • fetchManifest(manifestUrl: string): Promise<any>
  • Fetches a JSON manifest using the browser process and returns a Javascript object. Can be overwritten using {@link Platform#init Platform.init}.

    tutorial

    Platform.fetchManifest

    Parameters

    • manifestUrl: string

      The URL of the manifest to fetch.

    Returns Promise<any>

  • Gets a workspace data structure that represents the current state of the user's desktop.

    Returns Promise<Workspace>

  • Get a snapshot that contains browser windows with pages.

    Returns Promise<BrowserSnapshot>

  • getWindowContext(target?: Identity): Promise<any>
  • Get the context context of a host window that was previously set using {@link Platform#setWindowContext setWindowContext}. The context will be saved in any platform snapshots. Returns a promise that resolves to the context.

    tutorial

    Platform.getWindowContext

    experimental

    Parameters

    • Optional target: Identity

    Returns Promise<any>

  • Launch an application.

    import * as WorkspacePlatform from '@openfin/workspace-platform';

    const workspacePlatform = WorkspacePlatform.getCurrentSync();
    const req = {
    app: {
    appId: 'myAppId',
    title: 'appTitle',
    manifest: 'http://localhost/app.json',
    manifestType: AppManifestType.Manifest,
    icons:[
    {
    icon: "https://cdn.openfin.co/demos/notifications/generator/images/icon-blue.png",
    src: "https://cdn.openfin.co/demos/notifications/generator/images/icon-blue.png",
    type: "ico",
    },
    ]
    }
    }
    workspacePlatform.launchApp(req);

    Parameters

    Returns Promise<void>

  • launchContentManifest(manifestUrl: string): Promise<Platform>
  • Retrieves a manifest by url and launches a legacy application manifest or snapshot into the platform. Returns a promise that resolves to the wrapped Platform.

    tutorial

    Platform.launchContentManifest

    experimental

    Parameters

    • manifestUrl: string

      The URL of the manifest that will be launched into the platform. If this app manifest contains a snapshot, that will be launched into the platform. If not, the application described in startup_app options will be launched into the platform. The applicable startup_app options will become {@link View~options View Options}.

    Returns Promise<Platform>

  • on<EventType>(eventType: EventType, listener: EventHandler<PlatformEvent, EventType>, options?: SubscriptionOptions): Promise<WorkspacePlatformModule>
  • Type Parameters

    • EventType extends "crashed" | "closed" | "initialized" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "started" | "tray-icon-clicked" | "window-blurred" | "window-certificate-selection-shown" | "window-crashed" | "window-did-change-theme-color" | "window-focused" | "window-navigation-rejected" | "window-url-changed" | "window-did-fail-load" | "window-did-finish-load" | "window-page-favicon-updated" | "window-page-title-updated" | "window-resource-load-failed" | "window-response-received" | "window-child-content-blocked" | "window-child-content-opened-in-browser" | "window-child-view-created" | "window-view-attached" | "window-view-detached" | "window-auth-requested" | "window-begin-user-bounds-changing" | "window-bounds-changed" | "window-bounds-changing" | "window-closed" | "window-closing" | "window-disabled-movement-bounds-changed" | "window-disabled-movement-bounds-changing" | "window-embedded" | "window-end-user-bounds-changing" | "window-external-process-exited" | "window-external-process-started" | "window-hidden" | "window-hotkey" | "window-initialized" | "window-layout-initialized" | "window-layout-ready" | "window-maximized" | "window-minimized" | "window-options-changed" | "window-performance-report" | "window-preload-script-state-changed" | "window-preload-script-state-changing" | "window-reloaded" | "window-restored" | "window-show-requested" | "window-shown" | "window-user-movement-disabled" | "window-user-movement-enabled" | "window-will-move" | "window-will-redirect" | "window-will-resize" | "platform-api-ready" | "platform-snapshot-applied"

    Parameters

    • eventType: EventType
    • listener: EventHandler<PlatformEvent, EventType>
    • Optional options: SubscriptionOptions

    Returns Promise<WorkspacePlatformModule>

  • once<EventType>(eventType: EventType, listener: EventHandler<PlatformEvent, EventType>, options?: SubscriptionOptions): Promise<WorkspacePlatformModule>
  • Type Parameters

    • EventType extends "crashed" | "closed" | "initialized" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "started" | "tray-icon-clicked" | "window-blurred" | "window-certificate-selection-shown" | "window-crashed" | "window-did-change-theme-color" | "window-focused" | "window-navigation-rejected" | "window-url-changed" | "window-did-fail-load" | "window-did-finish-load" | "window-page-favicon-updated" | "window-page-title-updated" | "window-resource-load-failed" | "window-response-received" | "window-child-content-blocked" | "window-child-content-opened-in-browser" | "window-child-view-created" | "window-view-attached" | "window-view-detached" | "window-auth-requested" | "window-begin-user-bounds-changing" | "window-bounds-changed" | "window-bounds-changing" | "window-closed" | "window-closing" | "window-disabled-movement-bounds-changed" | "window-disabled-movement-bounds-changing" | "window-embedded" | "window-end-user-bounds-changing" | "window-external-process-exited" | "window-external-process-started" | "window-hidden" | "window-hotkey" | "window-initialized" | "window-layout-initialized" | "window-layout-ready" | "window-maximized" | "window-minimized" | "window-options-changed" | "window-performance-report" | "window-preload-script-state-changed" | "window-preload-script-state-changing" | "window-reloaded" | "window-restored" | "window-show-requested" | "window-shown" | "window-user-movement-disabled" | "window-user-movement-enabled" | "window-will-move" | "window-will-redirect" | "window-will-resize" | "platform-api-ready" | "platform-snapshot-applied"

    Parameters

    • eventType: EventType
    • listener: EventHandler<PlatformEvent, EventType>
    • Optional options: SubscriptionOptions

    Returns Promise<WorkspacePlatformModule>

  • prependListener<EventType>(eventType: EventType, listener: EventHandler<PlatformEvent, EventType>, options?: SubscriptionOptions): Promise<WorkspacePlatformModule>
  • Type Parameters

    • EventType extends "crashed" | "closed" | "initialized" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "started" | "tray-icon-clicked" | "window-blurred" | "window-certificate-selection-shown" | "window-crashed" | "window-did-change-theme-color" | "window-focused" | "window-navigation-rejected" | "window-url-changed" | "window-did-fail-load" | "window-did-finish-load" | "window-page-favicon-updated" | "window-page-title-updated" | "window-resource-load-failed" | "window-response-received" | "window-child-content-blocked" | "window-child-content-opened-in-browser" | "window-child-view-created" | "window-view-attached" | "window-view-detached" | "window-auth-requested" | "window-begin-user-bounds-changing" | "window-bounds-changed" | "window-bounds-changing" | "window-closed" | "window-closing" | "window-disabled-movement-bounds-changed" | "window-disabled-movement-bounds-changing" | "window-embedded" | "window-end-user-bounds-changing" | "window-external-process-exited" | "window-external-process-started" | "window-hidden" | "window-hotkey" | "window-initialized" | "window-layout-initialized" | "window-layout-ready" | "window-maximized" | "window-minimized" | "window-options-changed" | "window-performance-report" | "window-preload-script-state-changed" | "window-preload-script-state-changing" | "window-reloaded" | "window-restored" | "window-show-requested" | "window-shown" | "window-user-movement-disabled" | "window-user-movement-enabled" | "window-will-move" | "window-will-redirect" | "window-will-resize" | "platform-api-ready" | "platform-snapshot-applied"

    Parameters

    • eventType: EventType
    • listener: EventHandler<PlatformEvent, EventType>
    • Optional options: SubscriptionOptions

    Returns Promise<WorkspacePlatformModule>

  • prependOnceListener<EventType>(eventType: EventType, listener: EventHandler<PlatformEvent, EventType>, options?: SubscriptionOptions): Promise<WorkspacePlatformModule>
  • Type Parameters

    • EventType extends "crashed" | "closed" | "initialized" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "started" | "tray-icon-clicked" | "window-blurred" | "window-certificate-selection-shown" | "window-crashed" | "window-did-change-theme-color" | "window-focused" | "window-navigation-rejected" | "window-url-changed" | "window-did-fail-load" | "window-did-finish-load" | "window-page-favicon-updated" | "window-page-title-updated" | "window-resource-load-failed" | "window-response-received" | "window-child-content-blocked" | "window-child-content-opened-in-browser" | "window-child-view-created" | "window-view-attached" | "window-view-detached" | "window-auth-requested" | "window-begin-user-bounds-changing" | "window-bounds-changed" | "window-bounds-changing" | "window-closed" | "window-closing" | "window-disabled-movement-bounds-changed" | "window-disabled-movement-bounds-changing" | "window-embedded" | "window-end-user-bounds-changing" | "window-external-process-exited" | "window-external-process-started" | "window-hidden" | "window-hotkey" | "window-initialized" | "window-layout-initialized" | "window-layout-ready" | "window-maximized" | "window-minimized" | "window-options-changed" | "window-performance-report" | "window-preload-script-state-changed" | "window-preload-script-state-changing" | "window-reloaded" | "window-restored" | "window-show-requested" | "window-shown" | "window-user-movement-disabled" | "window-user-movement-enabled" | "window-will-move" | "window-will-redirect" | "window-will-resize" | "platform-api-ready" | "platform-snapshot-applied"

    Parameters

    • eventType: EventType
    • listener: EventHandler<PlatformEvent, EventType>
    • Optional options: SubscriptionOptions

    Returns Promise<WorkspacePlatformModule>

  • quit(): Promise<void>
  • Closes current platform, all its windows, and their views.

    tutorial

    Platform.quit

    Returns Promise<void>

  • removeAllListeners(eventType?: "crashed" | "closed" | "initialized" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "started" | "tray-icon-clicked" | "window-blurred" | "window-certificate-selection-shown" | "window-crashed" | "window-did-change-theme-color" | "window-focused" | "window-navigation-rejected" | "window-url-changed" | "window-did-fail-load" | "window-did-finish-load" | "window-page-favicon-updated" | "window-page-title-updated" | "window-resource-load-failed" | "window-response-received" | "window-child-content-blocked" | "window-child-content-opened-in-browser" | "window-child-view-created" | "window-view-attached" | "window-view-detached" | "window-auth-requested" | "window-begin-user-bounds-changing" | "window-bounds-changed" | "window-bounds-changing" | "window-closed" | "window-closing" | "window-disabled-movement-bounds-changed" | "window-disabled-movement-bounds-changing" | "window-embedded" | "window-end-user-bounds-changing" | "window-external-process-exited" | "window-external-process-started" | "window-hidden" | "window-hotkey" | "window-initialized" | "window-layout-initialized" | "window-layout-ready" | "window-maximized" | "window-minimized" | "window-options-changed" | "window-performance-report" | "window-preload-script-state-changed" | "window-preload-script-state-changing" | "window-reloaded" | "window-restored" | "window-show-requested" | "window-shown" | "window-user-movement-disabled" | "window-user-movement-enabled" | "window-will-move" | "window-will-redirect" | "window-will-resize" | "platform-api-ready" | "platform-snapshot-applied"): Promise<WorkspacePlatformModule>
  • Parameters

    • Optional eventType: "crashed" | "closed" | "initialized" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "started" | "tray-icon-clicked" | "window-blurred" | "window-certificate-selection-shown" | "window-crashed" | "window-did-change-theme-color" | "window-focused" | "window-navigation-rejected" | "window-url-changed" | "window-did-fail-load" | "window-did-finish-load" | "window-page-favicon-updated" | "window-page-title-updated" | "window-resource-load-failed" | "window-response-received" | "window-child-content-blocked" | "window-child-content-opened-in-browser" | "window-child-view-created" | "window-view-attached" | "window-view-detached" | "window-auth-requested" | "window-begin-user-bounds-changing" | "window-bounds-changed" | "window-bounds-changing" | "window-closed" | "window-closing" | "window-disabled-movement-bounds-changed" | "window-disabled-movement-bounds-changing" | "window-embedded" | "window-end-user-bounds-changing" | "window-external-process-exited" | "window-external-process-started" | "window-hidden" | "window-hotkey" | "window-initialized" | "window-layout-initialized" | "window-layout-ready" | "window-maximized" | "window-minimized" | "window-options-changed" | "window-performance-report" | "window-preload-script-state-changed" | "window-preload-script-state-changing" | "window-reloaded" | "window-restored" | "window-show-requested" | "window-shown" | "window-user-movement-disabled" | "window-user-movement-enabled" | "window-will-move" | "window-will-redirect" | "window-will-resize" | "platform-api-ready" | "platform-snapshot-applied"

    Returns Promise<WorkspacePlatformModule>

  • removeListener<EventType>(eventType: EventType, listener: EventHandler<PlatformEvent, EventType>, options?: SubscriptionOptions): Promise<WorkspacePlatformModule>
  • Type Parameters

    • EventType extends "crashed" | "closed" | "initialized" | "view-attached" | "view-blurred" | "view-certificate-selection-shown" | "view-crashed" | "view-did-change-theme-color" | "view-focused" | "view-navigation-rejected" | "view-url-changed" | "view-did-fail-load" | "view-did-finish-load" | "view-page-favicon-updated" | "view-page-title-updated" | "view-resource-load-failed" | "view-response-received" | "view-child-content-blocked" | "view-child-content-opened-in-browser" | "view-child-view-created" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "started" | "tray-icon-clicked" | "window-blurred" | "window-certificate-selection-shown" | "window-crashed" | "window-did-change-theme-color" | "window-focused" | "window-navigation-rejected" | "window-url-changed" | "window-did-fail-load" | "window-did-finish-load" | "window-page-favicon-updated" | "window-page-title-updated" | "window-resource-load-failed" | "window-response-received" | "window-child-content-blocked" | "window-child-content-opened-in-browser" | "window-child-view-created" | "window-view-attached" | "window-view-detached" | "window-auth-requested" | "window-begin-user-bounds-changing" | "window-bounds-changed" | "window-bounds-changing" | "window-closed" | "window-closing" | "window-disabled-movement-bounds-changed" | "window-disabled-movement-bounds-changing" | "window-embedded" | "window-end-user-bounds-changing" | "window-external-process-exited" | "window-external-process-started" | "window-hidden" | "window-hotkey" | "window-initialized" | "window-layout-initialized" | "window-layout-ready" | "window-maximized" | "window-minimized" | "window-options-changed" | "window-performance-report" | "window-preload-script-state-changed" | "window-preload-script-state-changing" | "window-reloaded" | "window-restored" | "window-show-requested" | "window-shown" | "window-user-movement-disabled" | "window-user-movement-enabled" | "window-will-move" | "window-will-redirect" | "window-will-resize" | "platform-api-ready" | "platform-snapshot-applied"

    Parameters

    • eventType: EventType
    • listener: EventHandler<PlatformEvent, EventType>
    • Optional options: SubscriptionOptions

    Returns Promise<WorkspacePlatformModule>

  • reparentView(viewIdentity: Identity, target: Identity): Promise<View>
  • DEPRECATED - please use Platform.createView. Reparents a specified view in a new target window.

    tutorial

    Platform.createView

    Parameters

    • viewIdentity: Identity

      View identity

    • target: Identity

      new owner window identity

    Returns Promise<View>

  • setActiveWorkspace(workspace: Workspace): Promise<void>
  • Sets the workspace as the current active workspace. Does not apply the workspace to the user's desktop.

    Parameters

    • workspace: Workspace

      the workspace to set as current active workspace.

    Returns Promise<void>

  • setWindowContext(context?: any, target?: Identity): Promise<void>
  • Set the context of a host window. The context will be available to the window itself, and to its child Views. It will be saved in any platform snapshots. It can be retrieved using {@link Platform#getWindowContext getWindowContext}.

    tutorial

    Platform.setWindowContext

    experimental

    Parameters

    • Optional context: any

      A field where serializable context data can be stored to be saved in platform snapshots.

    • Optional target: Identity

    Returns Promise<void>

Generated using TypeDoc