mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-27 12:15:33 +00:00
4d3016e023
This attempts to implement a bunch of the DOM Level 3 Events spec by implementing the KeyboardEvent interface, the document focus context, and dispatching keyup/keydown/keypress events appropriately. There's also some support for multiline text input that's untested. Source-Repo: https://github.com/servo/servo Source-Revision: 2ffa845cf463b14b19322d477a77ffd20efa89a9
8 lines
243 B
HTML
8 lines
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>
|