Skip to content

Uint8ClampedListToJSUint8ClampedArray

extension Uint8ClampedListToJSUint8ClampedArray on Uint8ClampedList

Conversions from Uint8ClampedList to JSUint8ClampedArray.

Properties

toJS extension no setter

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

INFO

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 getter simply casts.

When compiling to Wasm, this Uint8ClampedList is a wrapper around a Uint8ClampedArray if it was converted via JSUint8ClampedArrayToUint8ClampedList.toDart. If it is a wrapper, this getter unwraps it and returns the Uint8ClampedArray. If it's instantiated in Dart, this getter clones this Uint8ClampedList's values into a new JSUint8ClampedArray.

Avoid assuming that modifications to this Uint8ClampedList will affect the returned JSUint8ClampedArray and vice versa on all compilers unless it was converted first via JSUint8ClampedArrayToUint8ClampedList.toDart.

Available on Uint8ClampedList, provided by the Uint8ClampedListToJSUint8ClampedArray extension

Implementation
dart
external JSUint8ClampedArray get toJS;