MCPcopy
hub / github.com/ChromeDevTools/chrome-devtools-mcp / addHtmlRoute

Method addHtmlRoute

tests/server.ts:51–60  ·  view source on GitHub ↗
(path: string, htmlContent: string)

Source from the content-addressed store, hash-verified

49 }
50
51 addHtmlRoute(path: string, htmlContent: string) {
52 if (this.#routes[path]) {
53 throw new Error(`Route ${path} was already setup.`);
54 }
55 this.#routes[path] = (_req: IncomingMessage, res: ServerResponse) => {
56 res.setHeader('Content-Type', 'text/html; charset=utf-8');
57 res.statusCode = 200;
58 res.end(htmlContent);
59 };
60 }
61
62 addRoute(
63 path: string,

Callers 13

runSingleScenarioFunction · 0.80
browser.test.tsFile · 0.80
input.test.tsFile · 0.80
network.test.tsFile · 0.80
lighthouse.test.tsFile · 0.80
script.test.tsFile · 0.80
emulation.test.tsFile · 0.80
console.test.tsFile · 0.80
extensions.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected