MCPcopy Create free account
hub / github.com/deta/surf / addBeforeRequest

Method addBeforeRequest

app/src/main/webRequestManager.ts:106–110  ·  view source on GitHub ↗
(session: Electron.Session, handler: BeforeRequestCallback)

Source from the content-addressed store, hash-verified

104 }
105
106 addBeforeRequest(session: Electron.Session, handler: BeforeRequestCallback) {
107 this.register(session)
108 this.beforeRequest.get(session)!.push(handler)
109 return () => this.removeBeforeRequest(session, handler)
110 }
111
112 addBeforeSendHeaders(session: Electron.Session, handler: BeforeSendHeadersCallback) {
113 this.register(session)

Callers 2

createWindowFunction · 0.80
setAdblockerStateFunction · 0.80

Calls 4

registerMethod · 0.95
removeBeforeRequestMethod · 0.95
getMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected