Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

126
Views
How do I remove event listener whilst maintaining/passing 'e' variable

If I pass the main code to a different function, how do I pass the e variable? Is there any clean way I can add a fake event to the addEventListener parameters just for the purpose of removing it or something?

containers.forEach(container => {
  container.addEventListener('dragover', e => {
    //main code, uses e
  })
})

function f() {
  containers.forEach(container => {
    container.removeEventListener('dragover', ? ? ? )
  })
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!