]> git.ardis.lu - ard.is/commitdiff
Unwrap <span> when settled
authorArdis Lu <ardisglu@gmail.com>
Thu, 8 Jun 2023 05:04:40 +0000 (22:04 -0700)
committerArdis Lu <ardisglu@gmail.com>
Thu, 8 Jun 2023 05:04:40 +0000 (22:04 -0700)
Reduces DOM node clutter

index.html

index 86be2980c487d46471fed646ba33b4f1470abb3e..4373c71e98ffb443637597a08863f84826333496 100644 (file)
@@ -58,7 +58,7 @@
 
       function tick() {
         if (ticksRemaining === 0) {
-          charElem.textContent = finalChar;
+          charElem.replaceWith(finalChar);
           return;
         }
         charElem.textContent = cycle[cycleIndex];
This page took 0.044127 seconds and 4 git commands to generate.