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
Manifiesto V3, trabajador de servicio en segundo plano y popup.html

Si uso un trabajador de servicio background.js para inyectar js en la página web.

chrome.action.onClicked.addListener(async tab => { try { await chrome.scripting.executeScript({ target: { tabId: tab.id, allFrames: true, }, files: ["script.js"], }) ; } catch (erri) { console.error( failed to execute script: ${erri} ); } });

El javascript está cargado. Puedo ver que esto funciona porque agrega una clase al cuerpo del documento.

Sin embargo,

Si agrego un popup.html al manifiesto, se abre una ventana emergente con una casilla de verificación cuando se hace clic en el botón de extensión, el trabajador del servicio background.js ya no inyecta el script y la clase no se agrega al cuerpo del documento.

No puedo entender por qué.

Agradecería alguna orientación sobre cómo inyectar el script en el documento (página web) y también poder tener la funcionalidad emergente.

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!