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?
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)