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)
- Host: GitHub
- URL: https://github.com/zecat/google-recaptcha
- Owner: Zecat
- Created: 2017-05-15T01:18:18.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-01T13:46:21.000Z (almost 9 years ago)
- Last Synced: 2025-04-12T10:12:09.420Z (about 1 year ago)
- Language: HTML
- Homepage: https://www.webcomponents.org/element/Zecat/google-recaptcha
- Size: 2.79 MB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](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.