src/field/captcha/recaptchav2.js
/**
 * waits until google recaptcha is ready and renders
 */
waits until google recaptcha is ready and renders
waits until google recaptcha is ready and renders
function renderElement(lock, el, prop) {
  if (!window.grecaptcha || typeof window.grecaptcha.render !== 'function') {
    return setTimeout(() => renderElement(lock, el, prop), 100);
  }
  const id = l.id(lock);
  try {
    window.grecaptcha.render(el, {
      callback: value => {
        swap(updateEntity, 'lock', id, captcha.set, value, false);
      },
      'expired-callback': () => {
        swap(updateEntity, 'lock', id, captcha.reset);
      },
      ...prop
    });
  } catch (err) {}
}
function renderElement ( lock , el , prop ) { if ( ! window . grecaptcha || typeof window . grecaptcha . render !== 'function' ) { return setTimeout ( ( ) => renderElement ( lock , el , prop ) , 100 ) ; } const id = l . id ( lock ) ; try { window . grecaptcha . render ( el , { callback : value => { swap ( updateEntity , 'lock' , id , captcha . set , value , false ) ; } , 'expired-callback' : ( ) => { swap ( updateEntity , 'lock' , id , captcha . reset ) ; } , ... prop } ) ; } catch ( err ) { } }
waits until google recaptcha is ready and renders
waits until google recaptcha is ready and renders