From: Ardis Lu Date: Sun, 21 Aug 2022 06:30:41 +0000 (-0700) Subject: Replace previous results in the table body X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=df6ecf2abdce07c6b394ab6ecc78854b2cde01dd;p=ens2hex Replace previous results in the table body --- diff --git a/index.html b/index.html index d126cdb..1764db0 100644 --- a/index.html +++ b/index.html @@ -74,7 +74,6 @@ Address - @@ -147,8 +146,10 @@ body: JSON.stringify(batchPayload), }).then(r => r.json()); + table.querySelector('tbody')?.remove(); // Clear previous rows, if any + const body = table.createTBody(); for (const [index, response] of batchResponse.entries()) { - const row = table.insertRow(); + const row = body.insertRow(); const ens = row.insertCell(); const address = row.insertCell();