W3cubDocs

/Dart 2

JsObject class

Proxies a JavaScript object to Dart.

The properties of the JavaScript object are accessible via the [] and []= operators. Methods are callable via callMethod.

Implemented by

Constructors

JsObject(JsFunction constructor, [ List arguments ])
factory
Constructs a new JavaScript object from constructor and returns a proxy to it.
JsObject.fromBrowserObject(dynamic object)
factory
Constructs a JsObject that proxies a native Dart object; for expert use only. [...]
JsObject.jsify(dynamic object)
factory
Recursively converts a JSON-like collection of Dart objects to a collection of JavaScript objects and returns a JsObject proxy to it. [...]

Properties

hashCodeint
read-only
The hash code for this object. [...]
runtimeTypeType
read-only, inherited
A representation of the runtime type of the object.

Methods

callMethod(dynamic method, [ List args ]) → dynamic
Calls method on the JavaScript object with the arguments args and returns the result. [...]
deleteProperty(dynamic property) → void
Removes property from the JavaScript object. [...]
hasProperty(dynamic property) → bool
Returns true if the JavaScript object contains the specified property either directly or though its prototype chain. [...]
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.
noSuchMethod(Invocation invocation) → dynamic
inherited
Invoked when a non-existent method or property is accessed. [...]

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
operator [](dynamic property) → dynamic
Returns the value associated with property from the proxied JavaScript object. [...]
operator []=(dynamic property, dynamic value) → void
Sets the value associated with property on the proxied JavaScript object. [...]

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-js/JsObject-class.html