Skip to content

Commit 587a5ec

Browse files
committed
remove html page from sidenav, replace with js_interop. add prev/next to js interop pages
1 parent 31b8516 commit 587a5ec

File tree

10 files changed

+40
-10
lines changed

10 files changed

+40
-10
lines changed

src/_data/side-nav.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,9 @@
118118
permalink: /libraries/dart-convert
119119
- title: dart:io
120120
permalink: /libraries/dart-io
121-
- title: dart:html
122-
permalink: /libraries/dart-html
121+
- title: dart:js_interop
122+
permalink: /interop/js-interop
123+
match-page-url-exactly: true
123124
- divider
124125
- title: Iterable collections
125126
permalink: /libraries/collections/iterables

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

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
title: JavaScript interoperability
33
short-title: JS interop
44
description: Integrate JavaScript code into your Dart web app.
5+
nextpage:
6+
url: /interop/js-interop/usage
7+
title: Usage
58
---
69

710
The [Dart web platform](/overview#web-platform) supports communication with

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

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
---
22
title: JS types
33
description: Usage information about the core types in JS interop.
4+
prevpage:
5+
url: /interop/js-interop/usage
6+
title: Usage
7+
nextpage:
8+
url: /interop/js-interop/tutorials
9+
title: JS interop tutorials
410
---
511

612
Dart values and JS values belong to separate language domains. When compiling to

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

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
title: Migrate to package:web
33
description: How to migrate web interop code from dart:html to package:web.
4+
prevpage:
5+
url: /interop/js-interop/past-js-interop
6+
title: Past JS interop
47
---
58

69
Dart's [`package:web`][] exposes access to browser APIs,

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

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
---
22
title: Past JS interop
33
description: Archive of Dart's previous JS interop support.
4+
prevpage:
5+
url: /interop/js-interop/tutorials
6+
title: JS interop tutorials
7+
nextpage:
8+
url: /interop/js-interop/package-web/
9+
title: Migrate to package:web
410
---
511

612
:::warning

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

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
---
22
title: JS interop tutorials
33
description: Tutorials for common JavaScript interop use cases in Dart.
4+
prevpage:
5+
url: /interop/js-interop/js-types
6+
title: JS types
7+
nextpage:
8+
url: /interop/js-interop/past-js-interop
9+
title: Past JS interop
410
---
511

612
## Tutorials

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

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
---
22
title: Usage
33
description: How to declare and use JS interop members.
4+
prevpage:
5+
url: /interop/js-interop/
6+
title: JS interop
7+
nextpage:
8+
url: /interop/js-interop/js-types
9+
title: JS types
410
---
511

612
JS interop provides the mechanisms to interact with JavaScript APIs from Dart.

src/content/libraries/dart-html.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ prevpage:
77
---
88

99
:::warning
10-
`dart:html` is being replaced with [`package:web`][].
11-
Package maintainers should migrate to `package:web` as
12-
soon as possible to be compatible with Wasm.
13-
Read the [Migrate to package:web][] page for guidance.
10+
The `dart:html` library is deprecated.
11+
Instead, use [`dart:js_interop`][] or [`package:web`][].
1412
:::
1513

1614
Use the [dart:html][] library to program the browser, manipulate objects and
@@ -449,6 +447,7 @@ Dart has additional libraries for more specialized web APIs, such as
449447
For more information about Dart web libraries, see the
450448
[web library overview.][web library overview]
451449

450+
[`dart:js_interop`]: /interop/js-interop
452451
[AnchorElement]: {{site.dart-api}}/dart-html/AnchorElement-class.html
453452
[dart:html]: {{site.dart-api}}/dart-html/dart-html-library.html
454453
[Fetch data from the internet]: /tutorials/server/fetch-data

src/content/libraries/dart-io.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ prevpage:
55
url: /libraries/dart-convert
66
title: dart:convert
77
nextpage:
8-
url: /libraries/dart-html
9-
title: dart:html
8+
url: /interop/js-interop/
9+
title: dart:js_interop
1010
---
1111

1212
<?code-excerpt plaster="none"?>

src/content/libraries/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ consult the [Dart API reference.][Dart API]
4646
: I/O for programs that can use the Dart VM,
4747
including Flutter apps, servers, and command-line scripts.
4848

49-
[dart:html](/libraries/dart-html)
49+
[dart:js_interop](/interop/js-interop)
5050
: DOM and other APIs for browser-based apps.
51-
We now recommend using `package:web` over `dart:html`.
51+
`dart:js_interop` replaces `dart:html`.
5252

5353

5454
As mentioned, these pages are just an overview;

0 commit comments

Comments
 (0)