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

Function html

tests/utils.ts:234–253  ·  view source on GitHub ↗
(
  strings: TemplateStringsArray,
  ...values: unknown[]
)

Source from the content-addressed store, hash-verified

232}
233
234export function html(
235 strings: TemplateStringsArray,
236 ...values: unknown[]
237): string {
238 const bodyContent = strings.reduce((acc, str, i) => {
239 return acc + str + (values[i] || '');
240 }, '');
241
242 return `<!DOCTYPE html>
243<html lang="en">
244 <head>
245 <meta charset="UTF-8" />
246 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
247 <title>My test page</title>
248 </head>
249 <body>
250 ${bodyContent}
251 </body>
252</html>`;
253}
254
255export function stabilizeStructuredContent(content: unknown): unknown {
256 if (typeof content === 'string') {

Callers 15

testIncludesWebmcpToolsFunction · 0.85
McpContext.test.tsFile · 0.85
#handleMethod · 0.85
input.test.tsFile · 0.85
network.test.tsFile · 0.85
lighthouse.test.tsFile · 0.85
screenshot.test.tsFile · 0.85
script.test.tsFile · 0.85
emulation.test.tsFile · 0.85
pages.test.tsFile · 0.85

Calls

no outgoing calls

Tested by 2

testIncludesWebmcpToolsFunction · 0.68
setupWebMcpToolFunction · 0.68