Skip to content

Console Functions

The following functions can be invoked in the developer tools console. When you import from the IIFE bundle, these functions are available on the global cami object. When you import from the ESM bundle, these functions are available on the cami object.

Functions

cami.debug.enable()void

This function enables logging.

cami.debug.disable()void

This function disables logging. This is the default setting.

cami.events.enable()void

This function enables event emissions. This emits the `cami:state:change` event. One can then attach an eventListener to the window to capture this event. This is the default setting.

cami.events.disable()void

This function disables event emissions.

cami.debug.enable()

This function enables logging.

Example

cami.debug.enable();

cami.debug.disable()

This function disables logging. This is the default setting.

Example

cami.debug.disable();

cami.events.enable()

This function enables event emissions. This emits the cami:state:change event. One can then attach an eventListener to the window to capture this event. This is the default setting.

Example

cami.events.enable();
window.addEventListener('cami:state:change', function(e) {
  console.log('State changed:', e.detail);
});

cami.events.disable()

This function disables event emissions.

Example

cami.events.disable();