1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-27 02:56:18 -04:00

[assert] customEvent.html

This commit is contained in:
Witold Filipczyk 2024-05-09 18:35:32 +02:00
parent b9d266c52c
commit b67d41bd82

View File

@ -0,0 +1,12 @@
<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', 'detail');
console.exit(0);
</script>