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

94
Views
chrome.downloads.onCreated not working / Browser Plugin development

I'm a beginner in js and trying to code a plugin using "downloads"-API. Sadly I can't find out what's wrong. The console gives the following Error: " main.js:6 Uncaught TypeError: Cannot read properties of undefined (reading 'onCreated') "

Manifest:

{ 
    "manifest_version":3,
    "version":"1.0",
    "name":"Test",
    "content_scripts":[
        {
             "matches":["<all_urls>"],
             "js":["main.js"],
             "permissions":["downloads"]
        }
    ]
}

main.js :

function handleCreated(item) {
    console.log(item); 
}
chrome.downloads.onCreated.addListener(handleCreated);

The error occurs directly after the DOM is loaded, so it does not even recognize that it should wait until a download has started. Any idea?

thx a lot!

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!