Article

Refinitiv Workspace Web Side by Side - Context Exchange Integration

    Chavalit Jintamalit
    Developer Advocate

This article will cover how to use the Refinitiv Workspace Web Side by Side Integration API to exchange context with a web application on the same browser.

Sending context to Refinitiv Workspace Web:

Receiving context from Refinitiv Workspace Web:

Prerequisite:

Here is the sample web app code which demonstrate context sending/receiving API call.

Please create an index.html (or any preferred name) on your web server.

Then, you can add this code to the file.

To test the application, simple launch Refinitiv Workspace Web on Chrome browser.

Then launch the sample web app on the same Chrome browser.

You can click (1) button to simulate context send function.

You can click (2) button to simulate context receive function.

Explaination on the sample code and API calls.

Step 1. The script is downloaded from Refinitiv CDN

Step 2.  Initialize the API.

Step 3. Send a context with sxsWeb.setContext() API call

Step 4. Register a callback function to sxsWeb.onContextChange() to listen to the onContextChange event.

Step 5. Implement callback function, how to process the onContextChange event