Skip to content

Instantly share code, notes, and snippets.

@jamigibbs
Created June 11, 2019 22:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamigibbs/a6830df4318e08680aca2a1500597740 to your computer and use it in GitHub Desktop.
Save jamigibbs/a6830df4318e08680aca2a1500597740 to your computer and use it in GitHub Desktop.
var sitekey = null;
var hostUrl = null;
var onloadCallback = function () {
grecaptcha.render('widget1', {
'sitekey': sitekey,
'callback': grecaptchaRenderCallback
});
};
function grecaptchaRenderCallback(res) {
parent.postMessage({
action: "checkCAPTCHAState",
isValid: res ? true : false
}, '*');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment