Skip to content
This repository was archived by the owner on May 24, 2022. It is now read-only.

Commit 3e89027

Browse files
committed
EventDispatcher initial documentation
1 parent 1bdffea commit 3e89027

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

EventDispatcher.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
2-
* EventDispatcher base class.
2+
* Broadcasts events to registered event listeners.
33
* @constructor
4+
* @class
45
*/
5-
66
EventDispatcher = function () {
77
this._listeners = {};
88
};
@@ -19,10 +19,9 @@ EventDispatcher.prototype.addEventListener = function (type, method) {
1919
};
2020

2121
/**
22-
* Dispatch an event
22+
* Sends given event to all registered event listeners for that event type
2323
* @param {Event} event - The event
2424
*/
25-
2625
EventDispatcher.prototype.dispatchEvent = function (event) {
2726
var type = event.getType();
2827
if (!this.hasEventListener(type)){

0 commit comments

Comments
 (0)