mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
12 lines
436 B
HTML
12 lines
436 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', 'detail');
|
||
|
console.exit(0);
|
||
|
</script>
|