1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00
elinks/test/ecmascript/assert/customEvent.html

13 lines
435 B
HTML
Raw Normal View History

2024-05-09 12:35:32 -04:00
<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');
2024-05-09 14:50:01 -04:00
console.assert(e.detail.name === 'cat', 'cat');
2024-05-09 12:35:32 -04:00
console.exit(0);
2024-05-09 14:50:01 -04:00
</script>