Options
All
  • Public
  • Public/Protected
  • All
Menu

Controller for a Workspace Platform.

Hierarchy

  • Platform
    • WorkspacePlatformModule

Index

Properties

Private #private

#private: any

Application

Application: Application

Browser

The browser window factory for the Workspace Platform.

Layout

Layout: LayoutModule

Storage

The storage API for the Workspace Platform.

Theme

Theme: ThemeApi

Theme API for the Workspace Platform.

addListener

addListener: <E>(eventType: E, listener: (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void, options?: SubscriptionOptions) => Promise<WorkspacePlatformModule>

Type declaration

    • <E>(eventType: E, listener: (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void, options?: SubscriptionOptions): Promise<WorkspacePlatformModule>
    • Type parameters

      • E: string | symbol

      Parameters

      • eventType: E
      • listener: (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void
          • (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]): void
          • Parameters

            • payload: E extends string | number ? PlatformEvents[E] : any
            • Rest ...args: any[]

            Returns void

      • Optional options: SubscriptionOptions

      Returns Promise<WorkspacePlatformModule>

Protected deregisterAllListeners

deregisterAllListeners: (eventType: string | symbol) => Promise<void | EventEmitter>

Type declaration

    • (eventType: string | symbol): Promise<void | EventEmitter>
    • Parameters

      • eventType: string | symbol

      Returns Promise<void | EventEmitter>

Protected deregisterEventListener

deregisterEventListener: (eventType: string | symbol, options?: SubscriptionOptions) => Promise<void | EventEmitter>

Type declaration

    • (eventType: string | symbol, options?: SubscriptionOptions): Promise<void | EventEmitter>
    • Parameters

      • eventType: string | symbol
      • Optional options: SubscriptionOptions

      Returns Promise<void | EventEmitter>

emit

emit: <E>(eventName: E, payload: E extends string ? PlatformEvents[E] : any, ...args: any[]) => boolean

Type declaration

    • <E>(eventName: E, payload: E extends string ? PlatformEvents[E] : any, ...args: any[]): boolean
    • Type parameters

      • E: string | symbol

      Parameters

      • eventName: E
      • payload: E extends string ? PlatformEvents[E] : any
      • Rest ...args: any[]

      Returns boolean

eventNames

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

Type declaration

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

getClient

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

Type declaration

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

      • Optional identity: ApplicationIdentity

      Returns Promise<default>

identity

identity: ApplicationIdentity

Protected isNodeEnvironment

isNodeEnvironment: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

Protected isOpenFinEnvironment

isOpenFinEnvironment: () => boolean

Type declaration

    • (): boolean
    • Returns boolean

launchLegacyManifest

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

Type declaration

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

      • manifestUrl: string

      Returns Promise<Platform>

listenerCount

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

Type declaration

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

      • type: string | symbol

      Returns number

listeners

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

Type declaration

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

      • type: string | symbol

      Returns Function[]

on

on: <E>(eventType: E, listener: (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void, options?: SubscriptionOptions) => Promise<WorkspacePlatformModule>

Type declaration

    • <E>(eventType: E, listener: (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void, options?: SubscriptionOptions): Promise<WorkspacePlatformModule>
    • Type parameters

      • E: string | symbol

      Parameters

      • eventType: E
      • listener: (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void
          • (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]): void
          • Parameters

            • payload: E extends string | number ? PlatformEvents[E] : any
            • Rest ...args: any[]

            Returns void

      • Optional options: SubscriptionOptions

      Returns Promise<WorkspacePlatformModule>

once

once: <E>(eventType: E, listener: (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void, options?: SubscriptionOptions) => Promise<WorkspacePlatformModule>

Type declaration

    • <E>(eventType: E, listener: (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void, options?: SubscriptionOptions): Promise<WorkspacePlatformModule>
    • Type parameters

      • E: string | symbol

      Parameters

      • eventType: E
      • listener: (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void
          • (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]): void
          • Parameters

            • payload: E extends string | number ? PlatformEvents[E] : any
            • Rest ...args: any[]

            Returns void

      • Optional options: SubscriptionOptions

      Returns Promise<WorkspacePlatformModule>

prependListener

prependListener: <E>(eventType: E, listener: (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void, options?: SubscriptionOptions) => Promise<WorkspacePlatformModule>

Type declaration

    • <E>(eventType: E, listener: (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void, options?: SubscriptionOptions): Promise<WorkspacePlatformModule>
    • Type parameters

      • E: string | symbol

      Parameters

      • eventType: E
      • listener: (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void
          • (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]): void
          • Parameters

            • payload: E extends string | number ? PlatformEvents[E] : any
            • Rest ...args: any[]

            Returns void

      • Optional options: SubscriptionOptions

      Returns Promise<WorkspacePlatformModule>

prependOnceListener

prependOnceListener: <E>(eventType: E, listener: (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void, options?: SubscriptionOptions) => Promise<WorkspacePlatformModule>

Type declaration

    • <E>(eventType: E, listener: (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void, options?: SubscriptionOptions): Promise<WorkspacePlatformModule>
    • Type parameters

      • E: string | symbol

      Parameters

      • eventType: E
      • listener: (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void
          • (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]): void
          • Parameters

            • payload: E extends string | number ? PlatformEvents[E] : any
            • Rest ...args: any[]

            Returns void

      • Optional options: SubscriptionOptions

      Returns Promise<WorkspacePlatformModule>

Protected registerEventListener

registerEventListener: (eventType: string | symbol, options: SubscriptionOptions, applySubscription: (emitter: EventEmitter) => void, undoSubscription: (emitter: EventEmitter) => void) => Promise<void>

Type declaration

    • (eventType: string | symbol, options: SubscriptionOptions, applySubscription: (emitter: EventEmitter) => void, undoSubscription: (emitter: EventEmitter) => void): Promise<void>
    • Parameters

      • eventType: string | symbol
      • 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>

removeAllListeners

removeAllListeners: (eventType?: string | symbol) => Promise<WorkspacePlatformModule>

Type declaration

removeListener

removeListener: <E>(eventType: E, listener: (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void, options?: SubscriptionOptions) => Promise<WorkspacePlatformModule>

Type declaration

    • <E>(eventType: E, listener: (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void, options?: SubscriptionOptions): Promise<WorkspacePlatformModule>
    • Type parameters

      • E: string | symbol

      Parameters

      • eventType: E
      • listener: (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]) => void
          • (payload: E extends string | number ? PlatformEvents[E] : any, ...args: any[]): void
          • Parameters

            • payload: E extends string | number ? PlatformEvents[E] : any
            • Rest ...args: any[]

            Returns void

      • Optional options: SubscriptionOptions

      Returns Promise<WorkspacePlatformModule>

wire

wire: Transport<EntityType>

Accessors

Protected fin

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

me

  • get me(): Identity
  • Returns Identity

Protected topic

  • get topic(): string
  • set topic(t: string): void
  • Returns string

  • Parameters

    • t: string

    Returns void

Methods

applySnapshot

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

    Returns Promise<Platform>

closeView

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

    tutorial

    Platform.closeView

    Parameters

    • viewIdentity: Identity

      View identity

    Returns Promise<void>

createView

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

    tutorial

    Platform.createView

    Parameters

    • viewOptions: PlatformViewCreationOptions

      View creation options

    • Optional target: Identity
    • Optional targetView: Identity

    Returns Promise<View>

createWindow

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

    tutorial

    Platform.createWindow

    Parameters

    • options: PlatformWindowCreationOptions

      Window creation options

    Returns Promise<_Window & Identity>

fetchManifest

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

getSnapshot

  • Get a snapshot that contains browser windows with pages.

    Returns Promise<BrowserSnapshot>

getWindowContext

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

launchApp

launchContentManifest

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

quit

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

    tutorial

    Platform.quit

    Returns Promise<void>

reparentView

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

setWindowContext

  • 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