Verifying custom event hooks
Use the browser console to verify that events are firing correctly.
- Define the extensibility configuration on the page:
window.RhythmExtensibilityConfig = { enabledEvents: ['miniCart:*'] }; - Reload the page.
- Register a listener in the browser console:
window.addEventListener('miniCart:panel:beforeOpen', function(event) { console.log('Event fired:', event.type, event.detail.data); }); - Perform the action that triggers the event. For example, click the cart icon to enable miniCart:panel:beforeOpen.
- Verify that the event shows in the browser console with the expected payload.