diff --git a/CHANGELOG.md b/CHANGELOG.md index 89f7bc10cdbc..75607d96a787 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -241,6 +241,16 @@ AOT snapshot can be used as follows to run DDC /bin/dartaotruntime Users should migrate to using `dart:js_interop` and `package:web`. See [#59716][]. +#### `dart:js` + +- `dart:js` is marked deprecated and will be removed in an upcoming release. + Users should migrate to using `dart:js_interop`. See [#59716][]. + +#### `dart:js_util` + +- `dart:js_util` is marked deprecated and will be removed in an upcoming + release. Users should migrate to using `dart:js_interop`. See [#59716][]. + [#59716]: https://github.com/dart-lang/sdk/issues/59716 ## 3.6.0 diff --git a/sdk/lib/js/js.dart b/sdk/lib/js/js.dart index 760ba7035c96..70fce9731c74 100644 --- a/sdk/lib/js/js.dart +++ b/sdk/lib/js/js.dart @@ -84,6 +84,7 @@ /// var jsArray = JsObject.jsify([1, 2, 3]); /// /// {@category Web (Legacy)} +@Deprecated('Use dart:js_interop instead.') library dart.js; import 'dart:collection' show ListMixin; diff --git a/sdk/lib/js_util/js_util.dart b/sdk/lib/js_util/js_util.dart index caa1ad2fefec..3d73e10fd275 100644 --- a/sdk/lib/js_util/js_util.dart +++ b/sdk/lib/js_util/js_util.dart @@ -14,6 +14,7 @@ /// with `@JS()` annotations. /// /// {@category Web (Legacy)} +@Deprecated('Use dart:js_interop instead.') library dart.js_util; // Examples can assume: @@ -148,7 +149,16 @@ class NullRejectionException implements Exception { /// Converts a JavaScript Promise to a Dart [Future]. /// -/// ```dart template:top +/// ```dart +/// // ignore: deprecated_member_use_from_same_package +/// import 'dart:js_util'; +/// +/// // ignore: deprecated_member_use_from_same_package +/// import 'package:js/js.dart'; +/// +/// @JS() +/// class Promise {} +/// /// @JS() /// external Promise get threePromise; // Resolves to 3 ///