Is there a way to monitor changes to an object?

前端 未结 3 594
南笙
南笙 2021-01-18 06:45

Instead triggering an event based on user action can you just listen for changes to an object and react then?

3条回答
  •  离开以前
    2021-01-18 07:41

    You can use getters and setters ro react on properties change. John Resig have written great article about them.

提交回复
热议问题