operator [] method

dynamic operator [] (dynamic property)

Returns the value associated with property from the proxied JavaScript object.

The type of property must be either String or num.

Implementation

dynamic operator [](property) {
  if (property is! String && property is! num) {
    throw ArgumentError("property is not a String or num");
  }
  return _convertToDart(JS('', '#[#]', _jsObject, property));
}