blob: a572ebc77d46780a8ba3717fa38e8f5aa7c57d46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<!DOCTYPE html>
<html class="reftest-wait">
<table style="table-layout: fixed; width: 130px">
<tr>
<td style="overflow: hidden; white-space: nowrap;">
Some long text that cannot possibly fit in 130 px, because it just can't.
</td>
</tr>
</table>
<script>
onload = function() {
var td = document.querySelector("td");
// Make sure layout has happened.
var width = td.offsetWidth;
td.style.textOverflow = "ellipsis";
document.documentElement.className = "";
}
</script>
</html>
|