// CarBase Klass or something, add EventDispatcher functionality to it.
var CarBase = Object.create( EventDispatcher );
// add CarBase specific functionality
CarBase.start = function() {
console.log('car start');
}
//
var carA = Object.create( CarBase );
carA.on('start', function() {
carA.start();
});
carA.fire('start');
-
Notifications
You must be signed in to change notification settings - Fork 0
marexandre/EventDispatcher.js
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Simple EventDispatcher
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published