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

631
Views
Extensión de Chrome: TypeError no capturado: no se pueden leer las propiedades de undefined (leyendo 'onClicked')

He estado creando una extensión de Chrome que debería ejecutar un determinado script (index.js) en una pestaña particular al hacer clic en la extensión.

trabajador_servicio.js

 // action on extension click chrome.browserAction.onClicked.addListener(function (tab) { chrome.tabs.executeScript({ tabId: tab.id, }, { file: "index.js" }); });

yo tambien he probado

 chrome.action......

y

 browser....

Pero nada funciona, estoy usando manifest v3.

manifiesto.json

 { "name": "Meet scraper", "version": "0.1", "author": "Naveenkumar M", "description": "Scrapes meet data from meetup.com", "manifest_version": 3, "permissions": [ "activeTab", "tabs" ], "background": { "service_worker": "service_worker.js" } }

Y mi archivo index.js es

 console.log("Hello world")

tengo el error ingrese la descripción de la imagen aquí

corrígeme si estoy equivocado

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Manifiesto v2

Las siguientes claves deben declararse en el manifiesto para usar esta API.

browser_action

revisa este enlace para más detalles

https://developer.chrome.com/docs/extensions/reference/browserAction/

Actualización 1:

Manifiesto v3

necesita agregar acciones dentro de su archivo de manifiesto

 { "action": { … } }

y luego puedes llamarlo así

 chrome.action.onClicked.addListener(tab => { … });
about 4 years ago · Juan Pablo Isaza Report
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!