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

Method dispatchClose

packages/next/src/server/web/web-on-close.ts:52–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50 }
51
52 dispatchClose() {
53 if (this.isClosed) {
54 throw new Error('Cannot close a CloseController multiple times')
55 }
56 if (this.listeners > 0) {
57 this.target.dispatchEvent(new Event('close'))
58 }
59 this.isClosed = true
60 }
61}

Callers 4

adapterFunction · 0.95
handlerMethod · 0.95
toResponseMethod · 0.80
executeAfterMethod · 0.80

Calls 1

dispatchEventMethod · 0.80

Tested by

no test coverage detected