Appearance
Int16ListToJSInt16Array
extension Int16ListToJSInt16Array on Int16ListConversions from Int16List to JSInt16Array.
Properties
toJS extension no setter
JSInt16Array get toJSConverts this Int16List to a JSInt16Array by either casting, unwrapping, or cloning the Int16List.
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 Int16List is a wrapper around a Int16Array if it was converted via JSInt16ArrayToInt16List.toDart. If it is a wrapper, this getter unwraps it and returns the Int16Array. If it's instantiated in Dart, this getter clones this Int16List's values into a new JSInt16Array.
Avoid assuming that modifications to this Int16List will affect the returned JSInt16Array and vice versa on all compilers unless it was converted first via JSInt16ArrayToInt16List.toDart.
Available on Int16List, provided by the Int16ListToJSInt16Array extension
Implementation
dart
external JSInt16Array get toJS;