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

73
Views
Why doesn't my event handler work in Javascript?

I made a game with Unity and now I want to make a game launcher for it. I already start and I have a problem now. I use electron with Html, Css and want to use JS in the backend. I have an button with an ID and in JS I have an event handler for it.

Thats the inportant part of Html:

<img id="startGame" class="instances-icon1" src="assets/icons8-add-48.png">

And thats the important part of Javascript:

const updateURL = 'https://www.dropbox.com/sh/smphut3qh3z40p6/AACHccLIURSjFd3a1vHrMmq4a?dl=1';
const executablePath = 'C:\Users\Linus\Documents\Bluci Runners\exe';

document.getElementById("startGame").addEventListener("click", function() {
  fetch(updateURL).then(res => res.blob()).then(blob => fs.createWriteStream(executablePath).write(blob));
  console.log("Succes!");
})

The dropbox link is where Js shall download the game. My problem is that the event handler isnt working.

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!