You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So while looking at the code, I noticed that after the api.js script has been loaded, a 25ms looping setTimeout starts, waiting for the grecaptcha instance to be available. Now, in most cases the instance is already available and the timeout never starts, so that's good. But I was wondering if we could skip all of that logic alltogether, and rely on the onload callback that we can provide to ReCaptcha.
Code snippet below, I'm testing it with patch-package and it seems to work flawlessly. Wdyt, worth a PR?
So while looking at the code, I noticed that after the
api.js
script has been loaded, a 25ms looping setTimeout starts, waiting for thegrecaptcha
instance to be available. Now, in most cases the instance is already available and the timeout never starts, so that's good. But I was wondering if we could skip all of that logic alltogether, and rely on theonload
callback that we can provide to ReCaptcha.Code snippet below, I'm testing it with
patch-package
and it seems to work flawlessly. Wdyt, worth a PR?The text was updated successfully, but these errors were encountered: