I get an error message:
Uncaught DOMException: Blocked a frame with origin " link " from accessing a cross-origin frame. at: 1: 16
Code:
<html>
<body>
<script src='https://www.google.com/recaptcha/api.js?render=6LcJCIMUAAAAAKV8tUaI2FoVgmoGmksIH16hZmTW'></script>
<script>
grecaptcha.ready(function() {
grecaptcha.execute('6LcJCIMUAAAAAKV8tUaI2FoVgmoGmksIH16hZmTW', {action: 'action_name'})
.then(function(token) {
// Verify the token on the server.
});
});
</script>
</body>
</html>