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

167
Vistas
How can I make a JS function work on a new opened window?

I am creating a Chrome extension and I can't make call the function to work on the newly opened window. I cant call alertit().

window.onload = function() {
  var buttonn = document.getElementById("startt")
  buttonn.addEventListener("click", openerr)
}

function openerr() {
  var newwin = window.open(" https://www.instagram.com/explore/people/?hl=fr");
  alertit();
};

function alertit() {
  alert("wiiii")
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Edit: Thanks Ivar for editing the question

Your grammar and description is pretty poor, so I'll try and get what you are intending.

So, you are opening a window with your chrome extension, and want to alert on it. This can't be done to my knowledge by calling window.open then directly something else, as they are two seperate things.

To control the new page, I suggest you use a content script: https://developer.chrome.com/extensions/content_scripts#registration

Best of luck

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