Verifying custom event hooks

Use the browser console to verify that events are firing correctly.

  1. Define the extensibility configuration on the page:

    window.RhythmExtensibilityConfig = { enabledEvents: ['miniCart:*'] };

  2. Reload the page.
  3. Register a listener in the browser console:
    window.addEventListener('miniCart:panel:beforeOpen', function(event) {
      console.log('Event fired:', event.type, event.detail.data);
    });
    
  4. Perform the action that triggers the event. For example, click the cart icon to enable miniCart:panel:beforeOpen.
  5. Verify that the event shows in the browser console with the expected payload.