back to catalog
when promise callback execute
test

      const link = document.getElementById('test')
      const nextClick = new Promise(resolve => {
        console.log('add event listener')
        link.addEventListener('click', resolve, {once: true})
      })
      
      nextClick.then(event => {
        event.preventDefault()
        console.log('click callback')
      })
      console.log('end')