<h2>name</h2>
<div id="window_name"></div>
<script>
document.querySelector("#window_name").textContent =
window.name;
</script>