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])

Constructs a new JavaScript object from constructor and returns a proxy to it.

factory
JsObject.fromBrowserObject(object)

Constructs a JsObject that proxies a native Dart object; for expert use only.

factory
JsObject.internal()

JsObject.jsify(object)

Recursively converts a JSON-like collection of Dart objects to a collection of JavaScript objects and returns a JsObject proxy to it.

factory

Properties

hashCode int

read-only
runtimeType Type

表示对象的运行时类型。

read-only, inherited

Operators

operator ==(other) → dynamic

相等操作符。

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.

Methods

callMethod(String method, [List args]) → dynamic

Calls method on the JavaScript object with the arguments args and returns the result.

deleteProperty(String property) → void

Removes property from the JavaScript object.

hasProperty(String 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.

noSuchMethod(Invocation invocation) → dynamic

当一个不存在的函数或成员变量被访问时,该函数被调用。

inherited
toString() String

Returns the result of the JavaScript objects toString method.