2025-04-09 12:44:08 +00:00
|
|
|
import { executeCommand } from './broker.js';
|
2025-04-04 09:48:30 +00:00
|
|
|
|
|
|
|
function handleClick(): void {
|
|
|
|
console.log("Der Button wurde geklickt!");
|
|
|
|
alert("Hallo von TypeScript!");
|
|
|
|
|
2025-04-09 13:47:06 +00:00
|
|
|
//executeCommand();
|
|
|
|
fetch("/api/command", { method: "POST" })
|
|
|
|
.then(res => res.text())
|
|
|
|
.then(text => console.log("Server sagt:", text));
|
2025-04-04 09:48:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
document.addEventListener("DOMContentLoaded", () => {
|
|
|
|
const button = document.getElementById("myButton");
|
|
|
|
button?.addEventListener("click", handleClick);
|
|
|
|
});
|