api.on()
Description
Allows attaching a handler to the inner events
Usage
api.on(
event: string,
handler: function
): void;
Parameters
event
- (required) an event to be firedhandler
- (required) a handler to be attached (the handler arguments will depend on the event to be fired)
Events
info
The full list of the Booking internal events can be found here
Example
// create Booking
const booking = new booking.Booking("#root", {
cards,
cardShape
});
// ...
booking.api.intercept("event-name", handler);