Proxies a JavaScript object to Dart.
The properties of the JavaScript object are accessible via the []
and
[]=
operators. Methods are callable via callMethod.
Operators
-
operator [](property)
→
dynamic
-
Returns the value associated with property from the proxied JavaScript
object.
-
operator []=(property, value)
→
dynamic
-
Sets the value associated with property on the proxied JavaScript
object.
-
operator ==(other)
→
dynamic
-
The equality operator.
Methods
-
hasProperty(String property)
→
bool
-
Returns true if the JavaScript object contains the specified property
either directly or though its prototype chain.
-
deleteProperty(String property)
→
void
-
Removes property from the JavaScript object.
-
instanceof(JsFunction type)
→
bool
-
Returns true if the JavaScript object has type in its prototype chain.
-
toString()
→
String
-
Returns the result of the JavaScript objects toString method.
-
callMethod(String method, [List args])
→
dynamic
-
Calls method on the JavaScript object with the arguments args and
returns the result.
-
noSuchMethod(Invocation invocation)
→
dynamic
-
[noSuchMethod] is invoked when users invoke a non-existent method
on an object. The name of the method and the arguments of the
invocation are passed to [noSuchMethod] in an [Invocation].
If [noSuchMethod] returns a value, that value becomes the result of
the original invocation.