0
0
mirror of https://github.com/rkd77/elinks.git synced 2025-06-30 22:19:29 -04:00
elinks/test/js/assert/customEvent.html
2024-09-24 21:43:10 +02:00

13 lines
434 B
HTML

<script>
var e = new CustomEvent('message', { cancelable: true, detail: {name:"cat"}});
console.error('customEvent.html');
console.assert(e.cancelable, 'cancelable')
console.assert(!e.defaultPrevented, 'defaultPrevented false');
e.preventDefault();
console.assert(e.defaultPrevented, 'defaultPrevented true');
console.assert(e.type === 'message', 'message');
console.assert(e.detail.name === 'cat', 'cat');
console.exit();
</script>