Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

768
Vistas
chrome extension: null parameter error on querySelector on content script

I am creating a chrome extension that will interact with twitch drops and notify me if the drop is ready for collection. I am injecting a content script fetch attributes of a particular element by its class but it shows Cannot read properties of null (reading 'getAttribute'). Here is my content.js code:

var element = document.querySelector(".juerA");
var val = element.getAttribute('value');
console.log(val);

If I run the same code on the console, it works fine. I have tried using "run_at" : "document_end" but it doesn't work. I have also checked if the extension works if I change the matches of the content script with other web pages and it works.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda