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

145
Views
Chrome storage.local requires explicitly declared string, fails with variable representation

In a Chrome add-on:

this works:

var apiKey = e.target.value
chrome.storage.local.set({'IsletJiraApi': apiKey}, function() {});

and this also works:

var obj = {'IsletJiraApi': e.target.value}
chrome.storage.local.set(obj, function() {});

but this does not:

var apiKey = e.target.value
var varName = 'IsletJiraApi'
chrome.storage.local.set({varName: apiKey}, function() {});

Maddeningly, that is what I want so I can abstract to a function storageSet(key, val). This makes no sense to me, anyone know what is going on?

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!