Click the above button to make the modal visible. Open up the browser console to event listener in action.
Sample text
<ch5-button label="Trigger show pulse" sendEventOnClick="trigger_1"></ch5-button> <p> Click the above button to make the modal visible. Open up the browser console to event listener in action. </p> <ch5-modal-dialog id="demo" closable receiveStateShowPulse="trigger_1"> <p>Sample text</p> <ch5-image id="ex1-img" url="https://picsum.photos/200/300/?random"> </ch5-image> </ch5-modal-dialog>
var modal = document.getElementById('demo'); modal.addEventListener('beforeShow', function(e){ console.log('modal beforeShow event: ', e); })