summaryrefslogtreecommitdiffstats
path: root/layout/reftests/text-overflow/dynamic-change-1.html
blob: d2c6c3a9e2dcefe47350d38f05d1279192886dec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!DOCTYPE html>
<html class="reftest-wait">
  <div style="overflow: hidden; width: 130px; white-space: nowrap">
    Some long text that cannot possibly fit in 130 px, because it just can't.
  </div>

  <script>
    onload = function() {
      var div = document.querySelector("div");
      // Make sure layout has happened.
      window.width = div.offsetWidth;
      div.style.textOverflow = "ellipsis";
      document.documentElement.className = "";
    }
  </script>
</html>