Skip to content

Commit 4bd84d1

Browse files
committed
change wasm links to new page, add dart2wasm readme link
1 parent a7a0ed6 commit 4bd84d1

File tree

5 files changed

+14
-10
lines changed

5 files changed

+14
-10
lines changed

src/content/interop/js-interop/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ check out the [Past JS interop][] page for a more in depth summary on past
3535
iterations.
3636

3737
[recently]: https://medium.com/dartlang/dart-3-3-325bf2bf6c13
38-
[Wasm]: {{site.flutter-docs}}/platform-integration/web/wasm
38+
[Wasm]: /web/wasm
3939
[`package:web`]: {{site.pub-pkg}}/web
4040
[`dart:html`]: {{site.dart-api}}/dart-html/dart-html-library.html
4141
[`dart:svg`]: {{site.dart-api}}/dart-svg/dart-svg-library.html

src/content/interop/js-interop/js-types.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Usage information about the core types in JS interop.
44
---
55

66
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
88
values as foreign types. To provide Dart types for JS values,
99
[`dart:js_interop`] exposes a set of types prefixed with `JS` called "JS types".
1010
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:
9090
</div>
9191

9292
:::warning
93-
Compiling to JavaScript vs Wasm can introduce inconsistencies in both
93+
Compiling to JavaScript vs [Wasm][] can introduce inconsistencies in both
9494
performance and semantics for conversions. Conversions may have different costs
9595
depending on the compiler, so prefer to only convert values if you need to.
9696

@@ -233,7 +233,7 @@ error if the value returned was JS `null` or `undefined` to ensure soundness.
233233

234234
:::warning
235235
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
237237
Dart `null`, it doesn't actually *change* the value itself. If an interop member
238238
returns `undefined` and you pass that value back into JS, JS will see
239239
`undefined`, *not* `null`, when compiling to JS.
@@ -279,4 +279,5 @@ See [`toExternalReference`] and [`toDartObject`] to convert to and from an
279279
[`JSBoxedDartObject`]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-js_interop/JSBoxedDartObject-extension-type.html
280280
[`ExternalDartReference`]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-js_interop/ExternalDartReference-extension-type.html
281281
[`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

src/content/interop/js-interop/package-web.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ Do we have any other package migrations to show off here?
298298
{% endcomment -%}
299299

300300
[`package:web`]: {{site.pub-pkg}}/web
301-
[Wasm]: {{site.repo.dart.sdk}}/blob/main/pkg/dart2wasm/README.md
301+
[Wasm]: /web/wasm
302302
[html]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-html/dart-html-library.html
303303
[svg]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-svg/dart-svg-library.html
304304
[`dart:js_interop`]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-js_interop/dart-js_interop-library.html

src/content/interop/js-interop/past-js-interop.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Archive of past JS interop implementations.
44
---
55

66
:::warning
7-
None of these legacy interop libraries are supported when compiling to Wasm.
7+
None of these legacy interop libraries are supported when compiling to [Wasm][].
88
:::
99

1010
This page addresses previous iterations of JS interop for Dart that are
@@ -121,3 +121,4 @@ TODO: Link to `package:web` section
121121
[`dart:js_util`]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-js_util
122122
[`Function.toJS`]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-js_interop/FunctionToJSExportedDartFunction/toJS.html
123123
[`dart:js_interop_unsafe`]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-js_interop_unsafe
124+
[Wasm]: /web/wasm

src/content/web/wasm.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,15 @@ by following the temporary steps outlined here:
7878
Add a new file `site/main.dart.js` and fill it with the contents of
7979
this [`main.dart.js` sample](https://gist.github.com/mit-mit/0fcb1247a9444b0cadf611aa5fc6f32e).
8080

81-
1. Serve the output: `dart pub global run ` [`dhttpd`]
81+
1. Serve the output: `dart pub global run dhttpd` ([docs][dhttpd])
8282

83-
You can also check out this small example [here](https://github.com/mit-mit/sandbox).
83+
You can also try out this small example [here](https://github.com/mit-mit/sandbox).
84+
To learn more about Wasm compilation in Dart, check out the [README][].
8485

8586
[WasmGC]: https://developer.chrome.com/blog/wasmgc/
8687
[Flutter]: {{site.flutter}}/wasm
8788
[`package:web`]: {{site.pub-pkg}}/web
8889
[`dart:js_interop`]: {{site.dart.api}}/{{site.dart.sdk.channel}}/dart-js_interop
8990
[migrated]: /interop/js-interop/package-web/
90-
[`dhttpd`]: {{site.pub-pkg}}/dhttpd
91+
[dhttpd]: {{site.pub-pkg}}/dhttpd
92+
[README]: {{site.repo.dart.sdk}}/blob/main/pkg/dart2wasm/README.md

0 commit comments

Comments
 (0)