AECC database project.
at master 290 B view raw
1class includeHTML extends HTMLElement { 2 connectedCallback() { 3 const src = this.getAttribute("src"); 4 fetch(src).then(response => response.text()).then(data => this.outerHTML = data); 5 } 6} 7 8export function registerIncludeComponent() { 9 customElements.define("x-include", includeHTML); 10}