JsObject class
A proxy on a JavaScript object.
The properties of the JavaScript object are accessible via the[] and[]= operators. Methods are callable viacallMethod.
- Implementers
Constructors
- JsObject(JsFunctionconstructor, [List?arguments])
- Constructs a JavaScript object from its native
constructorand returnsa proxy to it.factory - JsObject.fromBrowserObject(Objectobject)
- Constructs aJsObject that proxies a native Dart object;for expert useonly.factory
- JsObject.jsify(Objectobject)
- Recursively converts a JSON-like collection of Dart objects to acollection of JavaScript objects and returns aJsObject proxy to it.factory
Properties
- hashCode→int
- The hash code for this object.no setteroverride
- runtimeType→Type
- A representation of the runtime type of the object.no setterinherited
Methods
- callMethod(
Objectmethod, [List?args])→ dynamic - Calls
methodon the JavaScript object with the argumentsargsandreturns the result. - deleteProperty(
Objectproperty)→ void - Removes
propertyfrom the JavaScript object. - hasProperty(
Objectproperty)→bool - Returns
trueif the JavaScript object contains the specified propertyeither directly or though its prototype chain. - instanceof(
JsFunctiontype)→bool - Returns
trueif the JavaScript object hastypein its prototype chain. - noSuchMethod(
Invocationinvocation)→ dynamic - Invoked when a nonexistent method or property is accessed.inherited
- toString(
)→String - Returns the result of the JavaScript objects
toStringmethod.override
Operators
- operator ==(
Objectother)→bool - The equality operator.override
- operator [](
Objectproperty)→ dynamic - Returns the value associated with
propertyfrom the proxied JavaScriptobject. - operator []=(
Objectproperty,Object?value)→ void