method createPropertyObserver


void createPropertyObserver()

Creates a CompoundObserver to observe property changes. NOTE, this is only done if there are any properties in the _observe object.

Source

void createPropertyObserver() {
  final observe = _element._observe;
  if (observe != null) {
    var o = _propertyObserver = new CompoundObserver();
    // keep track of property observer so we can shut it down
    _observers.add(o);

    for (var path in observe.keys) {
      o.addPath(this, path);

      // TODO(jmesserly): on the Polymer side it doesn't look like they
      // will observe arrays unless it is a length == 1 path.
      observeArrayValue(path, path.getValueFrom(this), null);
    }
  }
}