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

295
Vistas
Run time property in manifest.json not loading script after page load

Context - Chrome extension development

Goal – Access DOM elements when page has fully loaded. The page I'm accessing is heavy and I need to acccess the DOM when everything has loaded.

What I've done so far

I have set run_at property within my manifest.json to document_idle. However, this does not work as script returns error that it cannot find the element in question

manifest.json

"content_scripts": [
        {
         "js": ["contentScript.js"],
         "run_at": "document_idle"
        }

The the only thing that seems to work is the following

contentScript.js

setTimeout(() => {
const recordNameEl = document.querySelectorAll('[data="sectionId"]');
const recordNameString = recordNameEl[1].textContent;
const nameArray = recordNameString.split(' ');
console.log(nameArray[0]);
 }, 5000);

The above solution feels hacky. Whats best solution to have my script run when the page has completed loaded?

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