如何在Google Recaptcha v3中使用Promise?

时间:2019-03-01 13:56:27

标签: recaptcha

如何在Google Recaptcha v3(不可见)中使用Promise? grecaptcha.execute()返回带有then方法的对象,但这似乎不是一个Promise,并且它以null值调用,是否有任何方法可以在Google Recaptcha中使用Promise?

例如:-

grecaptcha.execute().then(function(token){
    console.log(token);
});

0 个答案:

没有答案
相关问题