Skip to content

Instantly share code, notes, and snippets.

@jamigibbs
Last active June 12, 2019 16:30
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/a8f5416718ac320fe3c970c0150216d9 to your computer and use it in GitHub Desktop.
Save jamigibbs/a8f5416718ac320fe3c970c0150216d9 to your computer and use it in GitHub Desktop.
({
afterRender: function(component, helper) {
this.superAfterRender();
const sitekey = component.get('v.reCaptchaSiteKey');
const hostURL = component.get('v.approvedHost');
const iframe = component.find('vfFrame').getElement()
const vfWindow = iframe.contentWindow;
iframe.onload = function() {
vfWindow.postMessage({type: 'CAPTCHA-SITEKEY', key: sitekey, hostURL}, hostURL);
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment