1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-20 01:46:15 -04:00
elinks/test/ecmascript/assert/keyboardEvent.html
Witold Filipczyk 20ab63c1d1 [spidermonkey] KeyboardEvent.keyCode (Enter only)
Only Enter is handled. Strings are not "finalized".
2024-05-12 13:17:15 +02:00

14 lines
452 B
HTML

<script>
var e = new KeyboardEvent('message', { cancelable: true, key: "Enter" });
console.error('keyboardEvent.html');
console.assert(e.cancelable, 'cancelable true');
console.assert(!e.defaultPrevented, 'false');
e.preventDefault();
console.assert(e.defaultPrevented, 'true');
console.assert(e.type === 'message', 'message');
console.assert(e.key === 'Enter', 'key Enter');
console.assert(e.keyCode === 13, 'ENTER = 13');
console.exit(0);
</script>