Simple javascript not working

@aurelie i think some adjustment is needed to stabdard JS in order to bind the values. I am not sure how to execute it in weweb. I found pure vue based problem (and related solution) specifically for google address autocomplete. I am able to run it as a vue app and it works. Any help on how to make it work on weweb would be really helpful.
Here is the reference link: javascript - How to change v-model value from JS - Stack Overflow