function initializeFlashComponents() {
  const components = document.querySelectorAll('.rev-Flash')

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

    const closeButton = component.querySelector('.rev-Close')

    if (closeButton) {
      closeButton.addEventListener('click', (e) => {
        e.preventDefault()
        closeFlash(component)
      })
    }
  }
}
/**
 * Initializes all flash components on page.
 * @returns {void}
 */
Initializes all flash components on page.
@returns {void}
Initializes all flash components on page . @returns { void }
function initializeFlashComponents() {
  const components = document.querySelectorAll('.rev-Flash')
  for (let i = 0; i < components.length; i++) {
    const component = components[i]
    const closeButton = component.querySelector('.rev-Close')
    if (closeButton) {
      closeButton.addEventListener('click', (e) => {
        e.preventDefault()
        closeFlash(component)
      })
    }
  }
}
function initializeFlashComponents ( ) { const components = document . querySelectorAll ( '.rev-Flash' ) for ( let i = 0 ; i < components . length ; i ++ ) { const component = components [ i ] const closeButton = component . querySelector ( '.rev-Close' ) if ( closeButton ) { closeButton . addEventListener ( 'click' , ( e ) => { e . preventDefault ( ) closeFlash ( component ) } ) } } }
Initializes all flash components on page.
Initializes all flash components on page .