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

209
Views
pass set from content script to popup script in chrome extension using storage doesn't work

it's my first chrome extension and I'm trying to send a set from content.js to popup.js . I tried using sendMessage and chrome.storage.local but I can't get it to work. this is how I set the data in content.js, I do it inside a chrome.runtime.onMessage.addListener since the user needs to input some data and then click on a button:

chrome.storage.local.set({dataset: accountSet});

the popup.js:

chrome.storage.local.get("dataset", function(data) {
                      if(typeof data.dataset == "undefined") {
                      //bad
                      } else {
                        data.dataset.forEach(function(value) {
                   //do smthg
                        });
                        document.getElementById("accounts-tab").innerHTML+='</table>';
                      }
                  });

I'm using manifest_version 3, thank you.

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!