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

270
Views
chrome.runtime.onMessage.addListener no responde

Guardé una variable en la clave: data Console.log (data.key), me da mis datos.

Pero ahora envío un mensaje a background.js desde mi popup.js y no lee la línea:

 sendResponse(data.key);

result = undefined, traté de sacarlo de chrome.storage.local.get("key", function(data) { }) y funcionó con una variable de prueba.

Ventana emergente.js:

 chrome.runtime.sendMessage({from: 'popup',subject: 'ubisoft'}, function (result) { window.alert(result) });

Fondo.js:

 chrome.runtime.onMessage.addListener((msg, sender,sendResponse) => { // First, validate the message's structure. if ((msg.from === 'popup') && (msg.subject === 'ubisoft')) { // Enable the page-action for the requesting tab. chrome.storage.local.get("key", function(data) { // Do something with data.key console.log(data.key) sendResponse(data.key); }); } });
about 4 years ago · Santiago Gelvez
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!