Skip to main content

TICKETLAYER_GLOBAL_KEY

@ticketlayer/live


@ticketlayer/live / index / TICKETLAYER_GLOBAL_KEY

Variable: TICKETLAYER_GLOBAL_KEY

const TICKETLAYER_GLOBAL_KEY: "Ticketlayer";

Defined in: state/registry.ts:18

The window.Ticketlayer global registry.

One stateful Live client per page, published on a well-known global so that Elements (a separate bundle, possibly CDN-loaded) can find and bind to it WITHOUT importing @ticketlayer/live. The contract is deliberately tiny and stable - it's the public integration surface for snippet/Webflow embeds:

  • getClient() - the rich stateful facade (events/cart/auth/theme/bus).
  • getSDK() - the Elements-shaped connector view of that same client.
  • ready() - resolves when the client is published (immediately if it already is); Elements await this instead of polling.

Publishing also dispatches a ticketlayer:ready CustomEvent on window, so a pure-DOM listener (no promise plumbing) can react too.