kinklist/global/loadin.mjs
April Eaton 0abf209616 Better devex
Using ES6 modueles and adding a JS LSP to `flake.nix`
2025-12-15 18:27:19 +01:00

8 lines
279 B
JavaScript

export function loadHTML(elementId, url) {
fetch(url)
.then((response) => response.text())
.then((data) => {
document.getElementById(elementId).innerHTML = data;
})
.catch((error) => console.error("Error loading HTML:", error));
}