The full public surface of an Entase instance.
Booking
| Method | Description |
|---|---|
book(eventID, options?) | Opens the checkout for an event. See Opening the checkout. |
Events
| Method | Description |
|---|---|
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
| Method | Description |
|---|---|
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
| Method | Description |
|---|---|
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
| Method | Description |
|---|---|
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
| Method | Description |
|---|---|
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:
entase.setTopWindowCenter(
window.screenTop + (window.innerHeight / 2),
window.screenLeft + (window.innerWidth / 2)
);This has no effect in pane mode.
Teardown
| Method | Description |
|---|---|
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.