class contactMailButton extends HTMLElement { constructor() { super(); this.addButton(); } async addButton(){ let sitekey = await (await fetch("/API/config.php?name=sitekey")).text(); console.log(sitekey); this.innerHTML = `E-Mail:
`; } } customElements.define("jl-contact_mail_button", contactMailButton);