// Get the dropdown, reload all the // iframes on the page with examples from the new chosen theme select.addEventListener("change", (event) => { const nextTheme = event.currentTarget.value; document.querySelectorAll("iframe").forEach((element) => { // Replace theme name in URL to load example from new theme element.src = element.src.replace(currentTheme, nextTheme); }); currentTheme = nextTheme; });