19 lines
334 B
JavaScript
19 lines
334 B
JavaScript
|
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);
|