Truly independent web browser
<!DOCTYPE html>
<script src="include.js"></script>
<style>
@font-face {
font-family: Ahem;
src: url("../../Ref/data/fonts/Ahem.ttf");
}
body { margin: 0; font: 20px/20px Ahem; }
div { width: 300px; }
p { margin: 0; }
.standard { line-clamp: 2; }
.webkit { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
</style>
<div id="standard" class="standard"><p>a</p><p>b</p><p>c</p><p>d</p></div>
<div id="standard-columns" class="standard" style="columns: 1"><p>a</p><p>b</p><p>c</p><p>d</p></div>
<div id="webkit" class="webkit"><p>a</p><p>b</p><p>c</p><p>d</p></div>
<div id="webkit-columns" class="webkit" style="columns: 1"><p>a</p><p>b</p><p>c</p><p>d</p></div>
<div id="webkit-column-width" class="webkit" style="column-width: 1000px"><p>a</p><p>b</p><p>c</p><p>d</p></div>
<script>
asyncTest(async done => {
await document.fonts.load("20px Ahem");
for (const id of ["standard", "standard-columns", "webkit", "webkit-columns", "webkit-column-width"])
println(`${id}: ${document.getElementById(id).getBoundingClientRect().height}`);
done();
});
</script>