blob: 6eedf375c7656a6b7cdd1afd5a892676fd8064f0 [file] [log] [blame]
<html>
<head>
<style>
body {
margin: 0;
}
input {
width: 100%;
height: 400px;
margin-bottom: 5000px;
}
</style>
<script type="text/javascript">
function loaded() {
var input = document.querySelector("input");
input.setSelectionRange(0, 0);
input.focus();
}
function focused() {
setTimeout(() => window.webkit.messageHandlers.testHandler.postMessage("focused"), 0);
}
function input() {
setTimeout(() => window.webkit.messageHandlers.testHandler.postMessage("input"), 0);
}
</script>
</head>
<body onload=loaded()>
<input onfocus=focused() oninput=input()></input>
</body>
</html>