MCPcopy
hub / github.com/vitest-dev/vitest / sendCdpEvent

Function sendCdpEvent

packages/browser/src/node/rpc.ts:413–417  ·  view source on GitHub ↗
(sessionId: string, event: string, payload?: Record<string, unknown>)

Source from the content-addressed store, hash-verified

411
412 // CDP
413 async sendCdpEvent(sessionId: string, event: string, payload?: Record<string, unknown>) {
414 assertCdpAllowed(project)
415 const cdp = await globalServer.ensureCDPHandler(sessionId, rpcId)
416 return cdp.send(event, payload)
417 },
418 async trackCdpEvent(sessionId: string, type: 'on' | 'once' | 'off', event: string, listenerId: string) {
419 assertCdpAllowed(project)
420 const cdp = await globalServer.ensureCDPHandler(sessionId, rpcId)

Callers

nothing calls this directly

Calls 3

assertCdpAllowedFunction · 0.85
ensureCDPHandlerMethod · 0.80
sendMethod · 0.45

Tested by

no test coverage detected