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

462
Views
En electron, ¿por qué no puedo acceder a los elementos DOM desde el subproceso del renderizador?

Tengo el ejemplo más básico de una aplicación Electron, con un index.html que tiene

 <span id="foo"></span>

y también incluye renderer.js a través de

 <script src="./renderer.js"></script>

El problema es que cuando trato de cambiar mi elemento DOM de renderer.js:

 var element = document.getElementById("foo") console.log({element}); element.innerText = "123";

Recibo este error, y "elemento" es nulo:

 Uncaught TypeError: Cannot set properties of null (setting 'innerText')

Según tengo entendido, ni siquiera estoy usando las funciones de Electron, solo estoy usando funciones que también podría usar en Chrome, por lo que no entiendo por qué este ejemplo simple no funcionará.

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!