function initializeModalComponents() {
  const modals = document.querySelectorAll('.rev-Modal')

  for (let i = 0; i < modals.length; i++) {
    const modal = modals[i]

    const closeButton = modal.querySelector('.rev-CloseButton')

    closeButton.addEventListener('click', (e) => {
      e.preventDefault()
      closeModal(modal)
    })
  }
}
/**
 * Initializes all modals components on page.
 * @returns {void}
 */
Initializes all modals components on page.
@returns {void}
Initializes all modals components on page . @returns { void }
function initializeModalComponents() {
  const modals = document.querySelectorAll('.rev-Modal')
  for (let i = 0; i < modals.length; i++) {
    const modal = modals[i]
    const closeButton = modal.querySelector('.rev-CloseButton')
    closeButton.addEventListener('click', (e) => {
      e.preventDefault()
      closeModal(modal)
    })
  }
}
function initializeModalComponents ( ) { const modals = document . querySelectorAll ( '.rev-Modal' ) for ( let i = 0 ; i < modals . length ; i ++ ) { const modal = modals [ i ] const closeButton = modal . querySelector ( '.rev-CloseButton' ) closeButton . addEventListener ( 'click' , ( e ) => { e . preventDefault ( ) closeModal ( modal ) } ) } }
Initializes all modals components on page.
Initializes all modals components on page .