Skip to content

Commit

Permalink
merge to main
Browse files Browse the repository at this point in the history
  • Loading branch information
devoncarew committed Feb 13, 2024
2 parents 8ef70b6 + 459b0e8 commit c7a156d
Show file tree
Hide file tree
Showing 298 changed files with 1,795 additions and 19,070 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
sdk: [beta]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
with:
sdk: ${{ matrix.sdk }}
- id: install
Expand All @@ -50,13 +50,15 @@ jobs:
sdk: [dev, beta]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
with:
sdk: ${{ matrix.sdk }}
- name: Install dependencies
run: dart pub get
- name: Run Chrome tests
- name: Run Chrome tests - js
run: dart test --platform chrome
- name: Run Chrome tests - wasm
run: dart test --platform chrome --compiler dart2wasm

# Ensure the generation script runs.
generation:
Expand All @@ -69,7 +71,7 @@ jobs:
sdk: [main, dev]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
with:
sdk: ${{ matrix.sdk }}
- name: Install Dart dependencies
Expand All @@ -93,7 +95,7 @@ jobs:
sdk: [main]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
with:
sdk: ${{ matrix.sdk }}
- name: Install Dart dependencies
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,34 @@
- Contribute a markdown file for the renamed classes from `dart:html` to
`package:web` (see [renames.md](tool/renames.md)).
- Migrate classes to use interop extension types that implement `JSObject`.
- Add generics to APIs that use `JSArray` and `JSPromise`. Typedefs of a Dart
primitive type are instead replaced with their JS type equivalent if they
appear as a type parameter in order to conform with the type bounds of
`JSArray` and `JSPromise`.
- Changed `record` types to be `JSObject` instead of `JSAny`.
- Reduce the number of DOM APIs we generate code for. Currently, the API needs
to be standards-track, and be supported by Safari, Chrome, and Firefox.
- Updated the source IDL version to `3.43.1`.
- Deprecate a few type aliases in favor of their standardized versions:

| Deprecated | Preferred |
|-----------------------|-------------------------|
| `AudioElement` | `HTMLAudioElement` |
| `HtmlElement` | `HTMLElement` |
| `CanvasElement` | `HTMLCanvasElement` |
| `ImageElement` | `HTMLImageElement` |
| `VideoElement` | `HTMLVideoElement` |
| `CssStyleDeclaration` | `CSSStyleDeclaration` |
| `ContextEvent` | `WebGLContextEvent` |
| `WebGL` | `WebGLRenderingContext` |

- Deprecate the top-level `createElementTag`, `createCanvasElement`,
`createIFrameElement`, and `querySelector` functions.
Instead, use the standard creation and query methods on `document`.
- Deprecate the `client` extension methods on `MouseEvent` and `Touch`.
Instead, directly use the `clientX` and `clientY` properties.
- Deprecate the `HttpRequest` API borrowed from `dart:html`.
Consider migrating to `package:http` instead.
- Include MDN API documentation as class and member dartdoc comments.
- Docs sourced from the [MDN Web Docs][] project; attributions and copyright
licensing by Mozilla Contributors is licensed under [CC-BY-SA 2.5][].
Expand Down
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ This package is intended to replace
similar Dart SDK libraries. It will support access to browser APIs from Dart
code compiled to either JavaScript or WebAssembly.

## Status

The APIs in this package are still fairly provisional and could change rapidly.
We'll continue to use [semantic versioning](https://semver.org/) as we evolve
the APIs.

## Usage

```dart
Expand All @@ -36,8 +30,8 @@ void main() {
Based on:

<!-- START updated by tool/update_bindings.dart. Do not modify by hand -->
- @webref/idl [3.39.1](https://www.npmjs.com/package/@webref/idl/v/3.39.1)
- @webref/css [6.10.0](https://www.npmjs.com/package/@webref/css/v/6.10.0)
- @webref/idl [3.43.1](https://www.npmjs.com/package/@webref/idl/v/3.43.1)
- @webref/css [6.11.0](https://www.npmjs.com/package/@webref/css/v/6.11.0)
<!-- END updated by tool/update_bindings.dart. Do not modify by hand -->

For instructions on re-generating the DOM bindings, see the
Expand Down
2 changes: 2 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ analyzer:
lines_longer_than_80_chars: ignore
# 1,333 instances in generated code.
non_constant_identifier_names: ignore
# Consider removing from dart_flutter_team_lints.
unreachable_from_main: ignore

linter:
rules:
Expand Down
Loading

0 comments on commit c7a156d

Please sign in to comment.