MCPcopy
hub / github.com/vitejs/vite / createErrorOverlay

Function createErrorOverlay

packages/vite/src/client/client.ts:343–350  ·  view source on GitHub ↗
(err: ErrorPayload['err'])

Source from the content-addressed store, hash-verified

341const hasDocument = 'document' in globalThis
342
343function createErrorOverlay(err: ErrorPayload['err']) {
344 clearErrorOverlay()
345 const { customElements } = globalThis
346 if (customElements) {
347 const ErrorOverlayConstructor = customElements.get(overlayId)!
348 document.body.appendChild(new ErrorOverlayConstructor(err))
349 }
350}
351
352function clearErrorOverlay() {
353 document.querySelectorAll<ErrorOverlay>(overlayId).forEach((n) => n.close())

Callers 1

handleMessageFunction · 0.85

Calls 2

clearErrorOverlayFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected