customElements.define( "back-button", class extends HTMLElement { constructor() { super(); } connectedCallback() { this.innerHTML = ` `; } } ); function goBack() { if (typeof window.history.back() == "undefined") window.location = "/index.html"; }