Initializes the SandaiClient with a given iframe ID.
The ID of the target iframe element in the DOM.
OptionaluserId: stringOptionalapiKey: stringCleans up all registered message event listeners previously added by _listenForMessage.
Call this method when the instance is being destroyed or no longer needs to listen to messages.
Initializes both the LoadManager and AuthManager instances in sequence.
This ensures that:
A promise that resolves once both managers have completed initialization.
A client for interacting with the embedded sandai iframe.
The
SandaiClienthandles iframe communication, message passing, and interactions via theInteractionManager.Usage
Param: iframeId
The ID of the target iframe element in the DOM.
Throws
Throws an error if the specified element does not exist or is not an iframe.