on method

  1. @Deprecated('Use subscribe() instead')
TTLink on(
  1. TTOnCb cb
)

Subscribe to updates and changes on a node or property in realtime.

Triggered once initially and whenever the property or node you're focused on changes, Since TT streams data, the callback will probably be called multiple times as new chunks come in.

To remove a listener call .off() on the same property or node.

@param cb The callback is immediately fired with the data as it is at that point in time. @returns same link context

Implementation

@Deprecated('Use subscribe() instead')
TTLink on(TTOnCb cb) {
  subscribe(cb);
  return this;
}