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

87
Vistas
Dispatch event on body tag with another element as the target

I have a client that uses EmberJS on their website. When I want to inject a value to one of the text input fields with elem.value="##", it changes the text inside the field, but does not update the variables that are sent to the server. It seems like there is an event listener on the <body> tag that does it. Is there a way to dispatch an event on the <body> element with some other element as the target?

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

0

In all single-page-apps / javascript-favoring forms, you have to trigger events that the app is listening too -- usually.

Not all JS apps that submit forms use the native form submit with the FormData object, etc.

So setting the value from outside of the app's code itself will still require knowledge of how the app has implemented their form.

One option is to use https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent (as per @Sebastian's suggestion)

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