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

113
Vistas
Dynamically change preload script

Is there a way to set/change the preload option in webPreferences after BrowserWindow has been created?

What I would like to do is make a webcrawler that changes its preload script whenever the BrowserWindow redirects to a new URL.

The issue that I am trying to solve is that the webcrawler needs to collect different information on different sites.

The only 2 solutions I can think of are:

  1. make 1 massive preload script that covers every website or
  2. create a new BrowserWindow with a different preload script each time it redirects,

but neither seems resource efficient.

Is it possible to change or use different preload scripts without using multiple instances of the BrowserWindow?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

no, preload script is tied to per-process browserwindow creation, not per-url navigation inside of browserwindow.

about 4 years ago · Juan Pablo Isaza Denunciar
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