set method
void
set(
- dynamic key,
- dynamic value
override
Set property to this JS object.
The key
would be a String or int value
The value
could be one of int, double, bool,
String, Future and JsValue
Implementation
void set(dynamic key, dynamic value) {
assert(!_disposed);
script._arguments[0].setValue(this);
if (key is String) {
script._arguments[1].setString(key, script);
} else if (key is int) {
script._arguments[1].setInt(key);
} else {
throw Exception("key must be a String or int");
}
script._arguments[2].set(value, script);
script._action(JS_ACTION_SET, 3);
}