Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind one attribute to many properties #10

Open
2 of 5 tasks
DrSensor opened this issue Sep 9, 2022 · 0 comments
Open
2 of 5 tasks

Bind one attribute to many properties #10

DrSensor opened this issue Sep 9, 2022 · 0 comments
Labels
data binding Everything related to data binding enhancement New feature or request
Milestone

Comments

@DrSensor
Copy link
Owner

DrSensor commented Sep 9, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data binding Everything related to data binding enhancement New feature or request
Development

No branches or pull requests

1 participant