ordStart, wordEnd);
        internals.setMarker(document, range, "spelling");
        wordStart = wordEnd + 1; // space (U+0020 or U+00A0)
      }
    } catch (_) {
      /* empty */
    }
  }

  function simulateTyping() {
    // Type the input, one letter at a time.
    document.execCommand("insertText", false, LOREM_IPSUM[main.textContent.length % LOREM_IPSUM.length]);

    // After typing each word, mark that word as a spelling error.
    // In content_shell, spaces are U+00A0 (&nbsp;) until they are no