MCPcopy
hub / github.com/vercel/next.js / on

Method on

test/lib/next-modes/base.ts:933–938  ·  view source on GitHub ↗
(event: Event, cb: (...args: any[]) => any)

Source from the content-addressed store, hash-verified

931 }
932
933 public on(event: Event, cb: (...args: any[]) => any) {
934 if (!this.events[event]) {
935 this.events[event] = new Set()
936 }
937 this.events[event].add(cb)
938 }
939
940 public off(event: Event, cb: (...args: any[]) => any) {
941 this.events[event]?.delete(cb)

Callers 15

runTestOnceFunction · 0.45
withRequestMetricsFunction · 0.45
networkIdleFunction · 0.45
constructorMethod · 0.45
traceChunksFunction · 0.45
createIpcFunction · 0.45
index.tsFile · 0.45
jest-entry.tsFile · 0.45
index.jsFile · 0.45
runDynamicWorkerFunction · 0.45
string-worker.jsFile · 0.45

Calls 1

addMethod · 0.45

Tested by 15

runAndCaptureOutputFunction · 0.36
runTestsFunction · 0.36
beforePageLoadFunction · 0.36
runTestsFunction · 0.36
beforePageLoadFunction · 0.36
launchStandaloneSessionFunction · 0.36
beforePageLoadFunction · 0.36
runTestsFunction · 0.36
beforePageLoadFunction · 0.36
beforePageLoadFunction · 0.36