(_req: Request, res: Response)
| 45 | tags = [APITags.browserAPI]; |
| 46 | |
| 47 | async handler(_req: Request, res: Response): Promise<void> { |
| 48 | const config = this.config(); |
| 49 | const externalAddress = config.getExternalWebSocketAddress(); |
| 50 | const id = pageID(); |
| 51 | const { protocol, host, pathname, href } = new URL( |
| 52 | `/devtools/page/${id}`, |
| 53 | externalAddress, |
| 54 | ); |
| 55 | const param = protocol.includes('wss') ? 'wss' : 'ws'; |
| 56 | const value = path.join(host, pathname); |
| 57 | |
| 58 | return jsonResponse(res, 200, { |
| 59 | description: '', |
| 60 | devtoolsFrontendUrl: `/devtools/inspector.html?${param}=${value}`, |
| 61 | id, |
| 62 | title: 'New Tab', |
| 63 | type: 'page', |
| 64 | url: 'about:blank', |
| 65 | webSocketDebuggerUrl: href, |
| 66 | }); |
| 67 | } |
| 68 | } |
nothing calls this directly
no test coverage detected