<!DOCTYPE html>
<html>
<body>
<style>
div:empty { display: none; }
</style>
<div>hello world</div>
<script>
const div = document.querySelector('div');
div.getBoundingClientRect();

div.innerHTML = '';
div.getBoundingClientRect();

div.innerHTML = 'PASS';

</script>
</body>
</html>
