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

268
Views
localStorage is not defined in background.js

I am trying to get and set in my extension using background.js but whenever I run the extension I get the error saying that referenceError: localStorage is not defined.

whereas if I use it in my App.js , it is getting and setting in the local storage.

Note: I am using manifest v3

chrome.cookies.get(
      { url: "https://www.xxxx.com/", name: "abc" },
      async (cookie) => {
        const cookieValue: any = cookie?.value;
        oldJwtToken = localStorage.getItem("abc");
        console.log(cookieValue);
        console.log(oldJwtToken);
}
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!