tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

white-space-nowrap-to-pre-line.html (740B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>No crashes or DCHECK failures if white-space changes from nowrap to pre-line</title>
      6 <link rel="author" title="Peng Zhou" href="mailto:zhoupeng.1996@bytedance.com">
      7 <link rel="help" href="https://drafts.csswg.org/css-text-4/#white-space-property">
      8 <link rel="help" href="https://issues.chromium.org/issues/389738294">
      9 <style>
     10 span {
     11  white-space: nowrap;
     12 }
     13 </style>
     14 <script>
     15 window.addEventListener('load', () => {
     16  const span = document.querySelector('span');
     17  span.innerHTML = 'text\n\t';
     18  requestAnimationFrame(() => {
     19    // pre-line should remove end-of-line spaces
     20    span.style.whiteSpace = 'pre-line';
     21  });
     22 });
     23 </script>
     24 </head>
     25 <body>
     26 <span></span>
     27 </body>
     28 </html>