(err: ErrorPayload['err'])
| 341 | const hasDocument = 'document' in globalThis |
| 342 | |
| 343 | function 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 | |
| 352 | function clearErrorOverlay() { |
| 353 | document.querySelectorAll<ErrorOverlay>(overlayId).forEach((n) => n.close()) |
no test coverage detected