When I click the box to confirm I am not a robot, the blue spinner starts spinning but never stops. Eventually the error "Error: Permission denied to access property" appears in the browser console, followed by a (seemingly) random 10 -15 character string, e.g. "rne4xiajwyh".
My code:
<script type="text/javascript">
var onloadCallback = function() {
grecaptcha.render('html_element', {
'sitekey' : 'my_site_key'
});
};
</script>
<form action="#" method="POST">
<div id="html_element"></div>
<br>
<input type="submit" value="Submit">
</form>
<script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit"
async defer>
</script>
I'm struggling to fix this as I can't find any solutions online, and am unsure how to debug it. Any help would be much appreciated.
Thanks
EDIT: Error message in chrome:
Uncaught DOMException: Blocked a frame with origin "https://www.google.com" from accessing a cross-origin frame.
at Dp.f.Ub (https://www.gstatic.com/recaptcha/api2/r20170213115309/recaptcha__pl.js:349:353)
at Dp.vb (https://www.gstatic.com/recaptcha/api2/r20170213115309/recaptcha__pl.js:345:59)