Function openAppSession

  • Parameters

    Returns {
        close(props?: CloseProps): Promise<void>;
        getDoc(): Promise<Doc>;
        onWebSocketEvent(listener: (event: WebSocketEvent) => void): () => void;
        resume(): Promise<void>;
    }

    • close: function
      • When the app session is no longer in use it must be closed using this function. If the same underlying enigma websocket is used somewhere else in the browser this is basically a no op, but if this is the last/only usage of the underlying enigma websocket that websocket will be closed.

        Parameters

        Returns Promise<void>

    • getDoc: function
      • Returns a promise of the Qix Doc object with a set of client-side Api extensions. Note that while the AppSession object is returned immediately this promise might take a while to resolve for bigger apps.

        Returns Promise<Doc>

    • onWebSocketEvent: function
      • Experimental

        Add an event-listener for this app-session.

        Parameters

        Returns () => void

    • resume: function
      • Experimental

        Resume a suspended session. This will resume exactly once if the session is currently suspended, otherwise nothing will be done.

        Returns Promise<void>