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

Bind one attribute to many properties #10

Open DrSensor opened 2 years ago

DrSensor commented 2 years ago

Make it feel like class attribute

<button type="submit"
  class="button primary"
  value:="money ^total"
  :ref="button ^many"
/>
const total
export default class {
  static get total() { return total }
  static set total(money) { total += value }
  money: number

  button: HTMLElementButton
  static many = [] as HTMLElement
}

Bind-able members