1 Matching Annotations
  1. Apr 2022
    1. ``js let originalHTML =

      Hello Mr. Wayne, decide what to do:

      • Call Alfred
      • Take Thalia Al Gul to the cinema
      • Save Gotham
      <span>Use the mouse to choose an option.</span> `;

      let newHTML = `

      Hello Batman, decide what to do:

      • Kill The Joker
      • Save Thalia Al Gul
      • Save Gotham

      <span>Use the batarang to choose an option.</span> `;

      // Diff HTML strings let output = htmldiff(originalHTML, newHTML);

      // Show HTML diff output as HTML (crazy right?)! document.getElementById("output").innerHTML = output; ```

      ```css ins { text-decoration: none; background-color: #d4fcbc; }

      del { text-decoration: line-through; background-color: #fbb6c2; color: #555; } ```