rkgk/static/throbber.js

19 lines
334 B
JavaScript
Raw Normal View History

2024-08-10 23:13:20 +02:00
export class Throbber extends HTMLElement {
constructor() {
super();
}
connectedCallback() {}
beginLoading() {
this.className = "loading";
}
showError(message) {
this.className = "error";
this.textContent = message;
}
}
customElements.define("rkgk-throbber", Throbber);