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

Function html

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

Source from the content-addressed store, hash-verified

275}
276
277export function html(
278 strings: TemplateStringsArray,
279 ...values: unknown[]
280): string {
281 const bodyContent = strings.reduce((acc, str, i) => {
282 return acc + str + (values[i] || '');
283 }, '');
284
285 return `<!DOCTYPE html>
286<html lang="en">
287 <head>
288 <meta charset="UTF-8" />
289 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
290 <title>My test page</title>
291 </head>
292 <body>
293 ${bodyContent}
294 </body>
295</html>`;
296}
297
298export function stabilizeStructuredContent(content: unknown): unknown {
299 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

Calls

no outgoing calls

Tested by 2

testIncludesWebmcpToolsFunction · 0.68
setupWebMcpToolFunction · 0.68