MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / emitEvent

Method emitEvent

packages/core/xhr/index.ts:138–147  ·  view source on GitHub ↗
(eventName: string, ...args: Array<any>)

Source from the content-addressed store, hash-verified

136 }
137
138 private emitEvent(eventName: string, ...args: Array<any>) {
139 if (isFunction(this['on' + eventName])) {
140 this['on' + eventName](...args);
141 }
142
143 const handlers = this._listeners.get(eventName) || [];
144 handlers.forEach((handler) => {
145 handler(...args);
146 });
147 }
148
149 private _setReadyState(value: number) {
150 if (this._readyState !== value) {

Callers 4

_loadResponseMethod · 0.95
_setReadyStateMethod · 0.95
_setRequestErrorMethod · 0.95
sendMethod · 0.95

Calls 4

isFunctionFunction · 0.90
forEachMethod · 0.80
getMethod · 0.65
handlerFunction · 0.50

Tested by

no test coverage detected