DrSensor / nusa

incremental runtime that bring both simplicity and power into webdev (buildless, cross-language, data-driven)
MIT License
4 stars 0 forks source link

ariaBusy and control timing for update #75

Open DrSensor opened 10 months ago

DrSensor commented 10 months ago
export const count = num.u8()

/** @example html```
<button ~
  @click=increment
  #text=count
>0</button>
```
will set `aria-busy=true` for 3s until the value change
*/ export function increment() {
  count.set(it => it + 1, { delay: 3*s })
}

Why make it builtin?

I'm thinking to make every accessibility feature be builtin into the framework. So this one is the first step towards that.