---
import Layout from "../layouts/Layout.astro";
---
<Layout title="">
    <div>
        <a id="fullscreen-btn" href="/tst2" target="_blank">Next</a>
    </div>
</Layout>
<script is:inline>
     document.getElementById('fullscreen-btn').addEventListener('click', function() {
            if (document.documentElement.requestFullscreen) {
                document.documentElement.requestFullscreen();
            } else if (document.documentElement.mozRequestFullScreen) { // Firefox
                document.documentElement.mozRequestFullScreen();
            } else if (document.documentElement.webkitRequestFullscreen) { // Chrome, Safari, and Opera
                document.documentElement.webkitRequestFullscreen();
            } else if (document.documentElement.msRequestFullscreen) { // IE/Edge
                document.documentElement.msRequestFullscreen();
            }
        });

        window.addEventListener('load', function() {
            alert('Please click the button to go fullscreen.');
        });
</script>