An open API service indexing awesome lists of open source software.

https://github.com/zecat/google-recaptcha

A Polymer element for google recaptcha V2 and invisible (Polymer 1.9 - 2.x)
https://github.com/zecat/google-recaptcha

Last synced: about 1 year ago
JSON representation

A Polymer element for google recaptcha V2 and invisible (Polymer 1.9 - 2.x)

Awesome Lists containing this project

README

          

[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/Zecat/google-recaptcha)

# \

A Polymer element for google recaptcha V2 and invisible.

```html



[[token]]

```

## Install
```
bower install -S Zecat/google-recaptcha
```

## Notes

- Promise polyfill is a dev dependency.
- Visit [https://www.google.com/recaptcha/admin](https://www.google.com/recaptcha/admin) to get a sitekey.

## Shadow DOM work-around

By-design, the google recaptcha doesn't work inside shadow dom, so we detect
when it has a ShadowRoot parent and if so, the recaptcha is placed in a
container light DOM, which sync its size and screen position with its original
\ parent, and the container is moved into the body.
The container is refit every time the user scroll or the \ is
notified of resize. This is an expensive task but the only solution so far.