MCPcopy Index your code
hub / github.com/jabbany/CommentCoreLibrary / dispatchEvent

Method dispatchEvent

src/core/CommentManager.ts:150–161  ·  view source on GitHub ↗

* Dispatches an event * @param name - event name * @param data - corresponding data

(name:string, data:Object = null)

Source from the content-addressed store, hash-verified

148 * @param data - corresponding data
149 */
150 public dispatchEvent(name:string, data:Object = null):void {
151 if (this._listeners.hasOwnProperty(name)) {
152 var listenerList:Array<Function> = this._listeners[name];
153 for (var i = 0; i < listenerList.length; i++) {
154 try {
155 listenerList[i](data);
156 } catch (e) {
157 console.warn(e);
158 }
159 }
160 }
161 }
162
163 /**
164 * Add an event listener

Callers 1

setBoundsMethod · 0.95

Calls 2

hasOwnPropertyMethod · 0.80
warnMethod · 0.80

Tested by

no test coverage detected