MCPcopy
hub / github.com/jabbany/CommentCoreLibrary / _dispatchEvent

Function _dispatchEvent

src/scripting/api/Runtime/Runtime.ts:135–142  ·  view source on GitHub ↗

* Dispatches an event to the corresponding object * @param {string} objectId - object to dispatch to * @param {string} event - event id * @param {any} payload - event object * @private

(objectId:string, event:string, payload:any)

Source from the content-addressed store, hash-verified

133 * @private
134 */
135 function _dispatchEvent(objectId:string, event:string, payload:any){
136 var obj:RegisterableObject = _registeredObjects[objectId];
137 if (typeof obj === "object") {
138 if (obj.dispatchEvent) {
139 obj.dispatchEvent(event, payload);
140 }
141 }
142 }
143
144 /**
145 * Checks to see if an object is registered under the id given

Callers 1

registerObjectFunction · 0.85

Calls 1

dispatchEventMethod · 0.65

Tested by

no test coverage detected