-
-
Save jamigibbs/a8f5416718ac320fe3c970c0150216d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
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