AboutSupportDeveloper GuideVersion 15.0.12

Interface WorkspacePlatformModule

Controller for a Workspace Platform.

Hierarchy

  • Platform
    • WorkspacePlatformModule

Properties

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, listener, options?) => Promise<WorkspacePlatformModule>)

Type declaration

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

      • EventType extends "crashed" | "started" | "closed" | "initialized" | "view-attached" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "tray-icon-clicked" | "file-download-location-changed" | "platform-api-ready" | "platform-snapshot-applied" | "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-file-download-started" | "view-file-download-progress" | "view-file-download-completed" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "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-file-download-started" | "window-file-download-progress" | "window-file-download-completed" | "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"

      Parameters

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

      Returns Promise<WorkspacePlatformModule>

emit: (<EventType>(eventType, payload, ...args) => boolean)

Type declaration

    • <EventType>(eventType, payload, ...args): boolean
    • Type Parameters

      • EventType extends "crashed" | "started" | "closed" | "initialized" | "view-attached" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "tray-icon-clicked" | "file-download-location-changed" | "platform-api-ready" | "platform-snapshot-applied" | "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-file-download-started" | "view-file-download-progress" | "view-file-download-completed" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "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-file-download-started" | "window-file-download-progress" | "window-file-download-completed" | "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"

      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" | "mainFrame" | "subFrame" | "styleSheet" | "script" | "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;
        } & {
            contentDisposition: string;
            downloadedBytes: number;
            eTag: string;
            fileName: string;
            lastModifiedTime: Date;
            mimeType: string;
            originalFileName: string;
            startTime: number;
            state: "started" | "progressing" | "cancelled" | "interrupted" | "completed";
            totalBytes: number;
            url: string;
        } & {
            state: "started";
            type: "file-download-started";
        }, "type"> & {
            type: "view-file-download-started";
        }, {
            type: EventType;
        }> | Extract<{
            topic: "application";
        } & Omit<BaseViewEvent & BaseEvent & {
            uuid: string;
        } & {
            name: string;
        } & {
            contentDisposition: string;
            downloadedBytes: number;
            eTag: string;
            fileName: string;
            lastModifiedTime: Date;
            mimeType: string;
            originalFileName: string;
            startTime: number;
            state: "started" | "progressing" | "cancelled" | "interrupted" | "completed";
            totalBytes: number;
            url: string;
        } & {
            state: "progressing" | "interrupted";
            type: "file-download-progress";
        }, "type"> & {
            type: "view-file-download-progress";
        }, {
            type: EventType;
        }> | Extract<{
            topic: "application";
        } & Omit<BaseViewEvent & BaseEvent & {
            uuid: string;
        } & {
            name: string;
        } & {
            contentDisposition: string;
            downloadedBytes: number;
            eTag: string;
            fileName: string;
            lastModifiedTime: Date;
            mimeType: string;
            originalFileName: string;
            startTime: number;
            state: "started" | "progressing" | "cancelled" | "interrupted" | "completed";
            totalBytes: number;
            url: string;
        } & {
            state: "cancelled" | "interrupted" | "completed";
            type: "file-download-completed";
        }, "type"> & {
            type: "view-file-download-completed";
        }, {
            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<FileDownloadStartedEvent, "type"> & {
            type: "window-file-download-started";
        }, {
            type: EventType;
        }> | Extract<{
            topic: "application";
        } & Omit<FileDownloadProgressEvent, "type"> & {
            type: "window-file-download-progress";
        }, {
            type: EventType;
        }> | Extract<{
            topic: "application";
        } & Omit<FileDownloadCompletedEvent, "type"> & {
            type: "window-file-download-completed";
        }, {
            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 | 1 | 2;
            monitorInfo: any;
            type: "tray-icon-clicked";
            x: number;
            y: number;
        }, {
            type: EventType;
        }> | Extract<{
            topic: "application";
        } & BaseEvent & {
            uuid: string;
        } & {
            name: string;
        } & {
            type: "file-download-location-changed";
        }, {
            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?) => Promise<default>)

Type declaration

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

      • Optional identity: ApplicationIdentity

      Returns Promise<default>

identity: ApplicationIdentity
launchLegacyManifest: ((manifestUrl) => Promise<Platform>)

Type declaration

    • (manifestUrl): Promise<Platform>
    • Parameters

      • manifestUrl: string

      Returns Promise<Platform>

listenerCount: ((type) => number)

Type declaration

    • (type): number
    • Parameters

      • type: string | symbol

      Returns number

listeners: ((type) => Function[])

Type declaration

    • (type): Function[]
    • Parameters

      • type: string | symbol

      Returns Function[]

wire: Transport<EntityType>

Accessors

  • get me(): Identity
  • Returns Identity

Methods

  • Parameters

    • events: AnalyticsEventInternal[]

    Returns Promise<void>

  • 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>

  • Applies the given workspace to the user's desktop. Makes that workspace the active workspace.

    Parameters

    Returns Promise<boolean>

    true if the workspace was applied, false if the workspace was not applied.

    Example

    Brief example of how to apply a workspace, currently stored in storage, to the desktop.

    const workspacePlatform = getCurrentSync();

    // This assumes that there is at least one workspace in storage.
    const allWorkspaces = await workspacePlatform.Storage.getWorkspaces();

    // Apply the first workspace in storage to the desktop.
    await workspacePlatform.applyWorkspace(allWorkspaces[0], {
    // Customize the behavior of the applyWorkspace call.
    skipPrompt: false,
    applySnapshotOptions: {
    closeExistingWindows: false,
    closeSnapshotWindows: false,
    skipOutOfBoundsCheck: false,
    },
    });
  • Closes a specified view in a target window.

    Parameters

    • viewIdentity: Identity

      View identity

    Returns Promise<void>

    Tutorial

    Platform.closeView

  • Experimental

    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.

    Parameters

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

    Returns Promise<void>

    Tutorial

    Platform.closeWindow

  • Creates a new view and attaches it to a specified target window.

    Parameters

    • viewOptions: Partial<ViewOptions>

      View creation options

    • Optional target: CreateViewTarget

      The window to which the new view is to be attached. If no target, create a view in a new window.

    • Optional targetView: Identity

      If provided, the new view will be added to the same tabstrip as targetView.

    Returns Promise<View>

    Tutorial

    Platform.createView

  • Creates a new Window.

    Parameters

    • options: PlatformWindowCreationOptions

      Window creation options

    Returns Promise<_Window & Identity>

    Tutorial

    Platform.createWindow

  • Fetches a JSON manifest using the browser process and returns a Javascript object. Can be overwritten using Platform#init Platform.init.

    Parameters

    • manifestUrl: string

      The URL of the manifest to fetch.

    Returns Promise<any>

    Tutorial

    Platform.fetchManifest

  • 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>

  • Experimental

    Get the context context of a host window that was previously set using Platform#setWindowContext setWindowContext. The context will be saved in any platform snapshots. Returns a promise that resolves to the context.

    Parameters

    • Optional target: Identity

      A target window or view may optionally be provided. If no target is provided, target will be the current window (if called from a Window) or the current host window (if called from a View).

    Returns Promise<any>

    Tutorial

    Platform.getWindowContext

  • Launch an application.

    Parameters

    Returns Promise<void>

    Deprecated

    This method is deprecated. It is recommended to use createView or createWindow instead.

    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);
  • Experimental

    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.

    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 View~options View Options.

    Returns Promise<Platform>

    Tutorial

    Platform.launchContentManifest

  • Type Parameters

    • EventType extends "crashed" | "started" | "closed" | "initialized" | "view-attached" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "tray-icon-clicked" | "file-download-location-changed" | "platform-api-ready" | "platform-snapshot-applied" | "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-file-download-started" | "view-file-download-progress" | "view-file-download-completed" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "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-file-download-started" | "window-file-download-progress" | "window-file-download-completed" | "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"

    Parameters

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

    Returns Promise<WorkspacePlatformModule>

  • Type Parameters

    • EventType extends "crashed" | "started" | "closed" | "initialized" | "view-attached" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "tray-icon-clicked" | "file-download-location-changed" | "platform-api-ready" | "platform-snapshot-applied" | "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-file-download-started" | "view-file-download-progress" | "view-file-download-completed" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "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-file-download-started" | "window-file-download-progress" | "window-file-download-completed" | "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"

    Parameters

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

    Returns Promise<WorkspacePlatformModule>

  • Type Parameters

    • EventType extends "crashed" | "started" | "closed" | "initialized" | "view-attached" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "tray-icon-clicked" | "file-download-location-changed" | "platform-api-ready" | "platform-snapshot-applied" | "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-file-download-started" | "view-file-download-progress" | "view-file-download-completed" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "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-file-download-started" | "window-file-download-progress" | "window-file-download-completed" | "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"

    Parameters

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

    Returns Promise<WorkspacePlatformModule>

  • Type Parameters

    • EventType extends "crashed" | "started" | "closed" | "initialized" | "view-attached" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "tray-icon-clicked" | "file-download-location-changed" | "platform-api-ready" | "platform-snapshot-applied" | "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-file-download-started" | "view-file-download-progress" | "view-file-download-completed" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "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-file-download-started" | "window-file-download-progress" | "window-file-download-completed" | "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"

    Parameters

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

    Returns Promise<WorkspacePlatformModule>

  • Closes current platform, all its windows, and their views.

    Returns Promise<void>

    Tutorial

    Platform.quit

  • Parameters

    • Optional eventType: "crashed" | "started" | "closed" | "initialized" | "view-attached" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "tray-icon-clicked" | "file-download-location-changed" | "platform-api-ready" | "platform-snapshot-applied" | "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-file-download-started" | "view-file-download-progress" | "view-file-download-completed" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "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-file-download-started" | "window-file-download-progress" | "window-file-download-completed" | "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"

    Returns Promise<WorkspacePlatformModule>

  • Type Parameters

    • EventType extends "crashed" | "started" | "closed" | "initialized" | "view-attached" | "window-alert-requested" | "window-created" | "window-end-load" | "window-not-responding" | "window-responding" | "window-start-load" | "connected" | "manifest-changed" | "not-responding" | "responding" | "run-requested" | "tray-icon-clicked" | "file-download-location-changed" | "platform-api-ready" | "platform-snapshot-applied" | "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-file-download-started" | "view-file-download-progress" | "view-file-download-completed" | "view-created" | "view-destroyed" | "view-hidden" | "view-hotkey" | "view-shown" | "view-target-changed" | "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-file-download-started" | "window-file-download-progress" | "window-file-download-completed" | "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"

    Parameters

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

    Returns Promise<WorkspacePlatformModule>

  • DEPRECATED - please use Platform.createView. Reparents a specified view in a new target window.

    Parameters

    • viewIdentity: Identity

      View identity

    • target: Identity

      new owner window identity

    Returns Promise<View>

    Tutorial

    Platform.createView

  • 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>

  • Experimental

    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 Platform#getWindowContext getWindowContext.

    Parameters

    • Optional context: any

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

    • Optional target: Identity

      A target window or view may optionally be provided. If no target is provided, the update will be applied to the current window (if called from a Window) or the current host window (if called from a View).

    Returns Promise<void>

    Tutorial

    Platform.setWindowContext