Skip to content

Instantly share code, notes, and snippets.


jamigibbs/renderer.js Secret

Last active Jun 12, 2019
What would you like to do?
afterRender: function(component, helper) {
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