setPropertyWithSymbol method

void setPropertyWithSymbol(
  1. String stringKey,
  2. JSValue value,
  3. JSSymbol symbol
)

ES6: Sets a property with a symbol key and tracks the symbol

Implementation

void setPropertyWithSymbol(String stringKey, JSValue value, JSSymbol symbol) {
  final key = symbol.propertyKey;
  // Track the symbol for Object.getOwnPropertySymbols()
  _symbolKeys[key] = symbol;
  // Set the property using the unique key
  setProperty(key, value);
}