substance-legacy icon indicating copy to clipboard operation
substance-legacy copied to clipboard

Add convenience to add listeners for node changes.

Open michael opened this issue 10 years ago • 0 comments

ATM, we use something like

doc.getEventProxy('path').add([node.id, 'title'], this, this.onChange)

It would be nicer to be able just to do:

node.connect(this, {
  'title:changed', this.onTitleChanged
});

or for any property change:

node.connect(this, {
  'node:changed': this.onChange
});

To disconnect:

node.disconnect(this);

michael avatar Aug 18 '15 22:08 michael