From 0f1871ec7464b88b1916a1693d43884bae18243a Mon Sep 17 00:00:00 2001 From: webreflection Date: Mon, 15 May 2023 19:09:17 +0200 Subject: [PATCH] [chore] Improve current Error extends --- pyscriptjs/src/exceptions.ts | 48 ++++++++++++------------------------ 1 file changed, 16 insertions(+), 32 deletions(-) diff --git a/pyscriptjs/src/exceptions.ts b/pyscriptjs/src/exceptions.ts index 6201be0ba27..ef45e3ab3f3 100644 --- a/pyscriptjs/src/exceptions.ts +++ b/pyscriptjs/src/exceptions.ts @@ -2,15 +2,10 @@ const CLOSEBUTTON = ` { + banner.appendChild(closeButton).addEventListener('click', () => { banner.remove(); }); - closeButton.innerHTML = CLOSEBUTTON; - - banner.appendChild(closeButton); } document.body.prepend(banner);