ObjectExtension extension

on

Properties

asJSAny → JSAny?

Available on Object?, provided by the ObjectExtension extension

Casts an Object to a JSAny, in a graceful manner. Returns null if this instance is not a JS value. See isJSAny.
no setter
asJSObject → JSObject?

Available on Object?, provided by the ObjectExtension extension

Casts an Object to a JSObject, in a graceful manner. Returns null if this instance is not a JS object. See isJSObject.
no setter
isJSAny → bool?

Available on Object?, provided by the ObjectExtension extension

Returns true if this instance is a JSAny. Returns null if it's an ambiguous Dart/JS type: a JS value that is also a Dart List, Map or Function (for example, when compiled with dart2js, a Dart List is a JS Array).
no setter
isJSExportedDartFunction → bool

Available on Object?, provided by the ObjectExtension extension

Returns true if this instance is a Dart function exported to JS with Function.toJS or Function.toJSCaptureThis.
no setter
isJSFunction → bool

Available on Object?, provided by the ObjectExtension extension

Returns true if this instance is a JS Function, including a Dart function exported with Function.toJS.
no setter
isJSObject → bool?

Available on Object?, provided by the ObjectExtension extension

Returns true if this instance is a JSObject. Returns null if it's an ambiguous Dart/JS type: a JS Array that is also a Dart List (when compiled with dart2js).
no setter
toJSDeep → JSAny?

Available on Object?, provided by the ObjectExtension extension

no setter

Methods

objectDartify() → Object?

Available on Object?, provided by the ObjectExtension extension

Converts an Object, which could be a JSAny, to a Dart type in a graceful manner. See isJSAny.