<!DOCTYPE HTML>
<html>
<head> </head>
<body>
<div id="elem">test</div>
<script>
var elem = document.getElementById('elem');
elem.addEventListener('test', function() {
alert(1);
});
elem.addEventListener('test', function() {
alert(2);
});
elem.addEventListener('test', function() {
alert(3);
});
var myEvent = new Event('test');
elem.dispatchEvent(myEvent);
</script>
</body>
</html>