extensions/amp-recaptcha-input/0.1/amp-recaptcha-service.js
/**
   * Function to create our recaptcha boostrap iframe.
   * Should be assigned to this.iframeLoadPromise_
   * @param {string} sitekey
   * @private
   */
Function to create our recaptcha boostrap iframe.
Should be assigned to this.iframeLoadPromise_
@param {string} sitekey
@private
Function to create our recaptcha boostrap iframe . Should be assigned to this . iframeLoadPromise_ @param { string } sitekey @private
initialize_(sitekey) {
    return this.createRecaptchaFrame_(sitekey).then(iframe => {
      this.iframe_ = iframe;
      this.unlisteners_ = [
        this.listenIframe_(
            'amp-recaptcha-ready', () => this.recaptchaApiReady_.resolve()
        ),
        this.listenIframe_(
            'amp-recaptcha-token', this.tokenMessageHandler_.bind(this)
        ),
        this.listenIframe_(
            'amp-recaptcha-error', this.errorMessageHandler_.bind(this)
        ),
      ];
      this.executeMap_ = {};
      this.win_.document.body.appendChild(this.iframe_);
      return loadPromise(this.iframe_);
    });
  }
initialize_ ( sitekey ) { return this . createRecaptchaFrame_ ( sitekey ) . then ( iframe => { this . iframe_ = iframe ; this . unlisteners_ = [ this . listenIframe_ ( 'amp-recaptcha-ready' , ( ) => this . recaptchaApiReady_ . resolve ( ) ) , this . listenIframe_ ( 'amp-recaptcha-token' , this . tokenMessageHandler_ . bind ( this ) ) , this . listenIframe_ ( 'amp-recaptcha-error' , this . errorMessageHandler_ . bind ( this ) ) , ] ; this . executeMap_ = { } ; this . win_ . document . body . appendChild ( this . iframe_ ) ; return loadPromise ( this . iframe_ ) ; } ) ; }
Function to create our recaptcha boostrap iframe.
Function to create our recaptcha boostrap iframe .