@@ -4,7 +4,7 @@ description: Usage information about the core types in JS interop.
4
4
---
5
5
6
6
Dart values and JS values belong to separate language domains. When compiling to
7
- Wasm, they execute in separate * runtimes* as well. As such, you should treat JS
7
+ [ Wasm] [ ] , they execute in separate * runtimes* as well. As such, you should treat JS
8
8
values as foreign types. To provide Dart types for JS values,
9
9
[ ` dart:js_interop ` ] exposes a set of types prefixed with ` JS ` called "JS types".
10
10
These types are used to distinguish between Dart values and JS values at
@@ -90,7 +90,7 @@ Generally, the conversion table looks like the following:
90
90
</div >
91
91
92
92
::: warning
93
- Compiling to JavaScript vs Wasm can introduce inconsistencies in both
93
+ Compiling to JavaScript vs [ Wasm] [ ] can introduce inconsistencies in both
94
94
performance and semantics for conversions. Conversions may have different costs
95
95
depending on the compiler, so prefer to only convert values if you need to.
96
96
@@ -233,7 +233,7 @@ error if the value returned was JS `null` or `undefined` to ensure soundness.
233
233
234
234
::: warning
235
235
There is a subtle inconsistency with regards to ` undefined ` between compiling to
236
- JS and Wasm. While compiling to JS * treats* ` undefined ` values as if they were
236
+ JS and [ Wasm] [ ] . While compiling to JS * treats* ` undefined ` values as if they were
237
237
Dart ` null ` , it doesn't actually * change* the value itself. If an interop member
238
238
returns ` undefined ` and you pass that value back into JS, JS will see
239
239
` undefined ` , * not* ` null ` , when compiling to JS.
@@ -279,4 +279,5 @@ See [`toExternalReference`] and [`toDartObject`] to convert to and from an
279
279
[ `JSBoxedDartObject` ] : {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-js_interop/JSBoxedDartObject-extension-type.html
280
280
[ `ExternalDartReference` ] : {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-js_interop/ExternalDartReference-extension-type.html
281
281
[ `toExternalReference` ] : {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-js_interop/ObjectToExternalDartReference/toExternalReference.html
282
- [ `toDartObject` ] : {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-js_interop/ExternalDartReferenceToObject/toDartObject.html
282
+ [ `toDartObject` ] : {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-js_interop/ExternalDartReferenceToObject/toDartObject.html
283
+ [ Wasm ] : /web/wasm
0 commit comments