// get with web apis #fullscren element and on click toggle fullscreen const darkmode = document.getElementById('darkmode'); const html = document.querySelector('html'); darkmode.addEventListener('click', () => { if (html.dataset.theme === 'dark') { html.dataset.theme = 'light'; } else { html.dataset.theme = 'dark'; } });