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

Function html

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

Source from the content-addressed store, hash-verified

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