script>
document.body.getClientRects();
let div = document.querySelector('div');
let ruby = Array.prototype.slice.call(document.querySelectorAll('ruby,rbb'));
ruby.forEach(function(e){ let n = div.cloneNode(true); e.appendChild(n); e.offsetHeight;});
</script>

</html>
