Skip to Content

Variable: sharedContext

const sharedContext: SharedContext

Module-level singleton shared by every integration custom element instance on the page.

Publishers obtain it via the integration element’s sharedContext property. Wait for the custom element to be defined first to ensure the class is registered:

// Replace 'your-integration' with the actual element tag name // (e.g. 'glomex-integration', 'joyn-integration') await customElements.whenDefined('your-integration-tag'); const integration = document.querySelector('your-integration-tag'); const sharedContext = integration.sharedContext;
Last updated on