Skip to content

Instantly share code, notes, and snippets.

@jamigibbs jamigibbs/renderer.js Secret
Last active Jun 12, 2019

Embed
What would you like to do?
({
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
You can’t perform that action at this time.