toJS property

JSUint8ClampedArray get toJS

Converts this Uint8ClampedList to a JSUint8ClampedArray by either casting, unwrapping, or cloning the Uint8ClampedList.

Note

Depending on whether code is compiled to JavaScript or Wasm, this conversion will have different semantics. When compiling to JavaScript, all typed lists are the equivalent JavaScript typed arrays, and therefore this method simply casts. When compiling to Wasm, this Uint8ClampedList may or may not be a wrapper depending on if it was converted from JavaScript or instantiated in Dart. If it's a wrapper, this method unwraps it. If it's instantiated in Dart, this method clones this Uint8ClampedList's values into a new JSUint8ClampedArray. Avoid assuming that modifications to this Uint8ClampedList will affect the JSUint8ClampedArray and vice versa unless it was instantiated in JavaScript.

Implementation

external JSUint8ClampedArray get toJS;