AboutSupportDeveloper GuideVersion 38.126.82.69

An instance of a SessionContextGroup

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

Properties

addContextHandler: ((handler, contextType?) => 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.

      • Optional contextType: 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?) => Promise<OpenFin.Context>)

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

Type declaration

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

      • Optional type: 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) => Promise<void>)

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

Type declaration

    • (context): Promise<void>
    • Parameters

      Returns Promise<void>