Better devex
Using ES6 modueles and adding a JS LSP to `flake.nix`
This commit is contained in:
parent
32ee2de008
commit
0abf209616
7 changed files with 42 additions and 12 deletions
8
global/loadin.mjs
Normal file
8
global/loadin.mjs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
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));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue