MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / on

Method on

src/lib/settings.js:358–361  ·  view source on GitHub ↗

* Adds a listener for the given event * @param {'update: ' | 'update: :after' | 'reset'} event * @param {function():void} callback

(event, callback)

Source from the content-addressed store, hash-verified

356 * @param {function():void} callback
357 */
358 on(event, callback) {
359 if (!this.#on[event]) this.#on[event] = [];
360 this.#on[event].push(callback);
361 }
362
363 /**
364 * Removes the given callback from the given event

Callers 15

getFreePortFunction · 0.45
spawnAsyncFunction · 0.45
createServerFunction · 0.45
launchAppFunction · 0.45
startRspackWatchFunction · 0.45
startPluginWatcherFunction · 0.45
mainFunction · 0.45
main.jsFile · 0.45
TabViewFunction · 0.45
$row1Function · 0.45
$row2Function · 0.45
openReferencesTabFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected