see http://apidocs.mendix.com/
_Widget.subscribe() and Processor.subscribe methods:
this.subscribe({
guid : myobject.getGUID(),
callback : function() {
console.log('changed')
}
});
Note that this responds only to changes, not to creates or deletes.