operator []= method

void operator []= (dynamic property, dynamic value)

Sets the value associated with property on the proxied JavaScript object.

The type of property must be either String or num.

Implementation

operator []=(property, value) {
  if (property is! String && property is! num) {
    throw new ArgumentError("property is not a String or num");
  }
  JS('', '#[#]=#', _jsObject, property, _convertToJS(value));
}