ReCaptcha/Example/ReCaptcha_Tests/mock.html

36 lines
702 B
HTML

<html>
<head>
<meta name="viewport" content="width=device-width" />
<script type="text/javascript">
var key = '${apiKey}';
var endpoint = '${endpoint}';
var shouldFail = ${shouldFail};
var post = function(value) {
window.webkit.messageHandlers.recaptcha.postMessage(value);
};
var execute = function() {
if (shouldFail) {
post('error');
}
else {
post(${message});
}
};
var reset = function() {
shouldFail = false;
post({ action: 'didLoad' });
};
var verify = function() {
post({ verify: shouldFail });
};
</script>
</head>
<body>
<span id="submit" style="visibility: hidden;"></span>
</body>
</html>