summaryrefslogtreecommitdiffstats
path: root/layout/reftests/first-line/caption-insert-in-first-line-2.html
blob: 90d25010d1122781bf0dbb94684bc8701d4b4051 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE html>
<style>
  div { color: red; }
  div::first-line { color: green }
  #table { display: inline-table; }
  #caption { display: table-caption; }
  #tbody { display: table-row-group; }
</style>
<div id="x">
  <span id="table">
    <span id="tbody">be green</span>
  </span>
</div>
<script>
  x.offsetWidth;
  var caption = document.createElement("span");
  caption.id = "caption";
  caption.textContent = "This should";
  table.insertBefore(caption, tbody);
</script>