AboutSupportDeveloper GuideVersion 47.154.100.2
OpenFin JavaScript API
    Preparing search index...

    Interface SessionContextGroup

    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>;
    }
    Index
    addContextHandler: (
        handler: OpenFin.ContextHandler,
        contextType?: string,
    ) => Promise<{ unsubscribe: () => void }>

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

    Type Declaration

      • (
            handler: OpenFin.ContextHandler,
            contextType?: string,
        ): 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?: string): 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