MCPcopy Create free account
hub / github.com/Wscats/chrome-devtools-cli / constructor

Method constructor

src/core/panel.ts:5–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3 public listen: any;
4 public send: any;
5 constructor() {
6 // 初始化,与 background.ts 建立连接
7 let { port, listen, send } = this.sendMessageToBackground();
8 this.port = port;
9 this.listen = listen;
10 this.send = send;
11 }
12 // 1.panel.ts 与 inject.ts 的通信方案,使用链接的方式
13 injectScriptLinkToPage = (scriptName: string, cb: Function): void => {
14 const src = `

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected