Knowledge Center Blog
  • Theme
  • Auto
  • Light
  • Dark
English en
Language ✕
  • Deutsche
  • Eesti
  • English
  • Español
  • Français
  • Hrvatski
  • Italiano
  • Latviešu
  • Lietuvių
  • Lëtzebuergesch
  • Malti
  • Nederlands
  • Português (BR)
  • Português (PT)
  • Română
  • Slovenčina
  • Slovenščina
  • Srpski
  • Suomi
  • Türkçe
  • Ελληνικά
  • Български
  • Русский
  • Українська
Log in
Developers Blog
Log in
Home Developers JavaScript client Methods reference
Search
Developers
JavaScript client
  • Overview
  • Installing the client
  • Constructor options
  • Checkout modes
  • Opening the checkout
  • Events
  • Methods reference
  • Tracking and consent
  • Advanced embed options
  • Troubleshooting
REST API (v2)
PHP SDK
Node.js SDK
Python SDK
WordPress plugin
JavaScript client

Methods reference

The complete public surface of the Entase client — booking, event subscription, runtime getters and setters, and teardown.

description View as Markdown

The full public surface of an Entase instance.

Booking

MethodDescription
book(eventID, options?)Opens the checkout for an event. See Opening the checkout.

Events

MethodDescription
on(name, callback)Registers a callback. One per event name — see Events.
off(name, callback?)Removes the callback registered for a name. The callback argument is ignored.

Both accept a space-separated string or an array of names.

Locale

MethodDescription
getLocale()Returns the configured value, including the literal 'auto' if that is what was set.
setLocale(locale)Changes the checkout language for later bookings.

getLocale() reports configuration, not resolution — with the default it returns 'auto', not the language that will actually be used. The 'auto' value is resolved at the moment book() is called, from the lang attribute of your <html> element, so changing the page language after creating the client is picked up without any further work.

Checkout mode

MethodDescription
getCheckoutMode()Returns the resolved mode, 'pane' or 'popup' — never 'auto'.
setCheckoutMode(mode)Sets the mode. 'auto' re-runs detection; an unrecognized value is ignored.

See Checkout modes.

Tracking

MethodDescription
getTracking()Returns the current tracking parameters object.
setTracking(tprm)Replaces the tracking parameters. Not merged — pass the complete set.

See Tracking and consent.

Pop-up positioning

MethodDescription
getTopWindowCenter()Returns { top, left }, the point the pop-up is centred on.
setTopWindowCenter(top, left)Moves that point.

The centre point is calculated once, when the instance is created, from the browser window's position on screen. It is not recalculated when the visitor moves or resizes the window, so on a long-lived page a pop-up can open away from the current window. Recalculate before booking if that matters:

JavaScript
1234
entase.setTopWindowCenter(
  window.screenTop + (window.innerHeight / 2),
  window.screenLeft + (window.innerWidth / 2)
);

This has no effect in pane mode.

Teardown

MethodDescription
destroy()Removes the client's window listeners. The instance cannot be reused.

Call it when the component or view that owns the instance goes away. After it, book() logs an error and does nothing — create a new instance instead.

Previous Events Next Tracking and consent
Was this article helpful?
On this page
  • Booking
  • Events
  • Locale
  • Checkout mode
  • Tracking
  • Pop-up positioning
  • Teardown
Learn how to Entase.
© 2026 Entase, Inc.

Entase

  • Events
  • Sign up

Platform

  • Pricing
  • Global reach
  • Integration
  • Marketing tools
  • Booking tools
  • Collaboration

Use cases

  • Theater and opera
  • Concerts and parties
  • Expos, fairs and festivals
  • Museums and attractions
  • Tours and experiences
  • Workshops and seminars
  • Fundraising
  • Tournaments

Knowledge center

  • Organizers
  • Attendees
  • Developers
  • Blog

Legal

  • Terms of use
  • Privacy policy
  • Cookies policy
search Questions? Search
auto_awesome LLM? Read llms.txt
support_agent Need help? Start chat