method writeValue


dynamic writeValue(Symbol name, newValue)

Helper to implement a setter of a property with the given name on a polymer element. This can be used on normal properties and also on computed properties, as long as the expression used for the computed property is assignable (see ComputedProperty).

Source

writeValue(Symbol name, newValue) {
  var property = _properties[name];
  if (property == null) {
    // Note: computed properties are created in advance in
    // createComputedProperties, so we should only need to create here
    // non-computed properties.
    property = _properties[name] = new _PropertyAccessor(name, this, null);
  }
  property.value = newValue;
}