gecko-dev/servo/tests/html/test_focus.html

8 строки
243 B
HTML

<body>
<input id="focused">
<script>
document.body.addEventListener('keydown', function() { alert("body"); }, false);
document.getElementById('focused').addEventListener('keydown', function() { alert("input"); }, false);
</script>
</body>