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

179
Views
Open link in the browser with electron doesen't work

I tried this BUT it doesn't work because my link is a div. Here is my JS:

document.addEventListener('click', function (event) {
  if (event.target.tagName === 'A' && event.target.href.startsWith('http')) {
    event.preventDefault()
    shell.openExternal(event.target.href)
  }
})

Works with this HTML:

<a style="display:block;color:white;text-decoration:none;" href="https://discord.com/">Test</a>

Does not work with:

<a style="display:block;color:white;text-decoration:none;" href="https://discord.com/"><div class="socialoutline"><img style="width:35px;position:relative;left:7px;top:9px;"src="assets/images/logo/social/discord.svg">&#8195;&#8196;Discord</div></a>
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!