AboutSupportDeveloper GuideVersion 41.132.100.56

An instance of a SessionContextGroup

interface SessionContextGroup {
    addContextHandler: ((handler: OpenFin.ContextHandler, contextType?: string) => Promise<{
        unsubscribe: (() => void);
    }>);
    getCurrentContext: ((type?: string) => Promise<OpenFin.Context>);
    id: string;
    setContext: ((context: OpenFin.Context) => Promise<void>);
}

Properties

addContextHandler: ((handler: OpenFin.ContextHandler, contextType?: string) => Promise<{
    unsubscribe: (() => void);
}>)

A SessionContextGroup instance method for adding a handler for context change.

Type declaration

    • (handler, contextType?): Promise<{
          unsubscribe: (() => void);
      }>
    • Parameters

      • handler: OpenFin.ContextHandler

        The callback to be invoked. Is invoked when (a) the context changes or (b) immediately after getting created if the context is already set.

      • OptionalcontextType: string

        The context type this handler should listen to. If not specified, a global handler for all context types will get created. Only one global handler is allowed per SessionContextGroup.

      Returns Promise<{
          unsubscribe: (() => void);
      }>

getCurrentContext: ((type?: string) => Promise<OpenFin.Context>)

A SessionContextGroup instance method for getting the current context of a certain type.

Type declaration

    • (type?): Promise<OpenFin.Context>
    • Parameters

      • Optionaltype: string

        The Context Type to get. If not specified the last contextType set would get used.

      Returns Promise<OpenFin.Context>

id: string

The SessionContextGroup's id.

setContext: ((context: OpenFin.Context) => Promise<void>)

A SessionContextGroup instance method for setting a context in the SessionContextGroup.

Type declaration

    • (context): Promise<void>
    • Parameters

      Returns Promise<void>