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

155
Vistas
How to add listener whether the function do if user open web browser's console

I'm working on React, but I want to execute the function only if the user open the web browser's console. I don't know that should I use the window.addEventListener or something else that like useEffect() that has a empty dependency array but run when user open web browser's console instead.

Is the React has an event listener that detect if user open the web browser's console.

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

0

Sir, There a simple way of doing this would be to check when the window is resized. Since you can't check the console without resizing the page, it would work (this works with both horizontal and vertical dev tools)

window.addEventListener('resize', function () {
  console.log('You resized this window or accessed the console.');
});
about 4 years ago · Juan Pablo Isaza Denunciar

0

If an event listener is added to an EventTarget from inside another listener — that is, during the processing of the event — that event will not trigger the new listener. However, the new listener may be triggered during a later stage of event flow, such as during the bubbling phase.

addEventListener(type, listener);
addEventListener(type, listener, options);
addEventListener(type, listener, useCapture);
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