title: grecaptcha.execute().then() not working as expected
body: <p>I have a very simple code about explicit invisible recaptcha v2 rendering and executing. </p>
  
  <p>So first off this is the code <a href="https://jsfiddle.net/715njfpL/" rel="nofollow noreferrer">https://jsfiddle.net/715njfpL/</a> or:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;html&gt;
    &lt;head&gt;
    &lt;link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css"&gt; 
    &lt;link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"&gt;
    &lt;script src="https://code.jquery.com/jquery-3.3.1.min.js"&gt;&lt;/script&gt;
    &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"&gt;&lt;/script&gt;
    &lt;script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"&gt;&lt;/script&gt;
    &lt;script&gt;
    var onloadCallback = function() {
      grecaptcha.render('xrecaptcha', {
        'sitekey': '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI',
        'size': 'invisible'
      });
    };
    &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div id="xrecaptcha"&gt;&lt;/div&gt;
      &lt;button&gt;Submit&lt;/button&gt;
      &lt;script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&amp;render=explicit" defer&gt;
      &lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  &lt;script&gt;
  $(function(){
    $('button').click(function(){
      grecaptcha.reset();
      grecaptcha.execute()
      .then(function(){return fetch('https://jsfiddle.net');});
    });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Once the button with text Submit is clicked, the order of events should be (a) reset recaptcha; (b) execute recaptcha; and (c) fetch something. I tried to get this work by using the thenable ability of 'grecaptcha.execute()', but it's a complete mess. </p>
  
  <p>If you open Chrome inspect console at <a href="https://jsfiddle.net/715njfpL/" rel="nofollow noreferrer">https://jsfiddle.net/715njfpL/</a> and click the button you will see that the order is (a) fetch (b) reset and (c) execute. Obviously the order is not what I was expecting. I was thinking that the function with fetch inside then is going to be called after <code>grecaptcha.execute()</code> has finished the POST request and response. What am I doing wrong here?</p>
  
  <p>There is another problem, I saw while debugging and that is that <code>grecaptcha.reset()</code> is not just resetting the form field but it seems like a XHR POST request is being made. So I would need a thenable or some kind of promise here too in order to achieve the desired order of events I described above. I would appreciate any help here too. </p>