ReCaptcha/Example/ReCaptcha_Tests/mock.html

32 lines
630 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"});
};
</script>
</head>
<body>
<span id="submit" style="visibility: hidden;"></span>
</body>
</html>