Skip to content

If i dont put force-in-body i cant send the request #4

@alejandrofernandezcanton

Description

Hello, I am trying to put google-recaptcha in my component and i have achieved. The problem is if I dont put force-in-body I cant send the request but if I put it when i move google-recaptcha from body to light DOM of my component is not displayed.

I have this in the index template of my app:

<google-recaptcha id="app__captcha" sitekey="6LdHISEUAAAAAN0FxtC5OBGQv-zrtj1tQ1Z_KUWf" ></google-recaptcha>

and I move it tomy component of this way:

(function () {
  Polymer({
    is: 'apollo-captcha',
    properties: {},
    ready: function() {
      this.async(function() {
        let root = this.domHost.$$('#commercialAssistant');
        let item = document.querySelector("#app__captcha");
        item.slot = 'captcha';
        root.appendChild(item);
      }, 1);
    }
  });
}());

I do the async function because dom host is in a template dom-if.

The problem is that if i put force-on-body captcha is not displayed and if i dont put it the captcha doesnt send the request.

Thanks for your time and sorry for my english!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions