Initializes the SafariExtensionHandler instance. Sets up the promise executor map and starts listening to extension events.
Builds a JSON-RPC request object with a unique identifier.
The method name to invoke on the extension.
Optional parameters for the method.
The constructed JSON-RPC request object.
Checks if the last pong received was longer than the max interval.
Dispatches a custom event to the document to communicate with the Safari extension.
The type of Safari extension event to dispatch.
Optional JSON-RPC request payload to send with the event.
Dispatches a custom event to the document to communicate with the Safari extension.
The type of Safari extension event to dispatch.
The method name to invoke on the extension.
Optional parameters for the method.
Handles incoming JSON-RPC responses from the Safari extension. Resolves or rejects promises based on the response.
The JSON-RPC response object received from the extension.
Sends a keep alive ping according to the defined interval.
Listens for 'AsperaDesktop.Pong' events.
Listens for 'AsperaDesktop.Response' events.
Listens for 'AsperaDesktop.Status' events.
Listens for 'AsperaDesktop.TransferActivity' events.
Monitors transfer activity.
A Promise that resolves with the response from the extension.
Sends a JSON-RPC request to the Safari extension.
The method name to invoke on the extension.
Optional payload for the request.
A Promise that resolves with the response from the extension.
Listens for Safari extension status changes. If the extension was disabled and enabled again after initializing the SDK, it will call 'monitorTransferActivity' to resume transfer activities.
Handles communication with the Safari extension using JSON-RPC over custom events.