toJSBox property

JSBoxedDartObject toJSBox

A JavaScript object that wraps this Object.

There are no usable members in the resulting JSBoxedDartObject and you may get a new JSBoxedDartObject when calling toJSBox on the same Dart Object.

Throws an Exception if this Object is a JavaScript value.

Unlike ObjectToExternalDartReference.toExternalReference, this returns a JavaScript value. Therefore, the representation is guaranteed to be consistent across all platforms and interop members can be declared on JSBoxedDartObjects.

Implementation

external JSBoxedDartObject get toJSBox;