<!DOCTYPE html>

<div id="host">Should be visible.</div>

<script>
    var host = document.getElementById('host');
    var root = host.createShadowRoot();
    root.innerHTML = "<div style='display: none'><content></content></div>";
    document.body.offsetTop;
    root.firstElementChild.style.display = 'block';
</script>
