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

165
Vistas
Uncaught TypeError: Failed to construct 'MouseEvent': Failed to read the 'view' property from 'UIEventInit': Failed to convert value to 'Window'

I can run the following in the Chrome console and it does what I want without error:

document.querySelector('.flat.pagination.next').dispatchEvent(new MouseEvent("mousedown",{ view: window, bubbles: true, cancelable: true, clientX: 0, clientY: 0, button: 0 }));

However, if I put the same line of code in to a Tampermonkey script, I get the following error:

Uncaught TypeError: Failed to construct 'MouseEvent': Failed to read the 'view' property from 'UIEventInit': Failed to convert value to 'Window'.

Presumably there is something wrong with the view: window part, but I can't see why it would behave differently in the console to a script.

Any ideas how I can get it to work?

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

0

I was able to get it to work as I needed by removing the options:

document.querySelector('.flat.pagination.next').dispatchEvent(new MouseEvent('mousedown'));
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