How can I call a function after grecaptcha.execute() has finished executing - triggered by an event?
问题 Currently grecaptcha.execute is being executed on page load as in the first JS example below. If reCAPTCHA challenge is triggered this happens when the page has loaded. Ideally this would happen when the form submit button is clicked instead. So I've tried this by moving this into the submit event (second JS example) and put the axios function into a promise. It's submitting before grecaptcha.execute has finished executing. What is it that I'm not understanding here? My first experience with