<!DOCTYPE html>
<html style="font-family: ahem; font-size: 50px; -webkit-font-smoothing: none;">
<body>
<style>
#test::after {
    display: table-row;
    content: '';
}
</style>
<script>
document.body.offsetTop;
test = document.createElement('div');
test.setAttribute('id', 'test');
document.body.appendChild(test)
test.appendChild(document.createElement('thead'));
document.body.offsetTop;
test.appendChild(document.createElement('div'));
</script>
</body>
</html>
