basic impl.; no websockets yet!

This commit is contained in:
ari melody 2025-08-01 14:41:23 +01:00
commit d8aa765bf7
Signed by: ari
GPG key ID: CF99829C92678188
5 changed files with 151 additions and 0 deletions

2
public/silver.min.js vendored Normal file
View file

@ -0,0 +1,2 @@
export default class Stateful{#e;#t=[];constructor(e){this.#e=e}get(){return this.#e}set(e){let t=this.#e;this.#e=e;for(let s in this.#t)this.#t[s](e,t)}update(e){this.set(e(this.#e))}onUpdate(e){return this.#t.push(e),e}removeListener(e){this.#t=this.#t.filter((t=>t!==e))}}