OLD | NEW |
1 ## 1.17.0 | 1 ## 1.17.0 |
2 | 2 |
3 ### Core library changes | 3 ### Core library changes |
4 * `dart:core` | 4 * `dart:core` |
5 * `Uri.replace` supports iterables as values for the query parameters. | 5 * `Uri.replace` supports iterables as values for the query parameters. |
6 * `Uri.parseIPv6Address` returns a `Uint8List`. | 6 * `Uri.parseIPv6Address` returns a `Uint8List`. |
7 | 7 |
8 ## 1.16.0 | 8 ## 1.16.0 |
9 | 9 |
10 ### Core library changes | 10 ### Core library changes |
11 | 11 |
12 * `dart:convert` | 12 * `dart:convert` |
13 * Added `BASE64URL` codec and corresponding `Base64Codec.urlSafe` constructor. | 13 * Added `BASE64URL` codec and corresponding `Base64Codec.urlSafe` constructor. |
14 | 14 |
15 * Introduce `ChunkedConverter` and deprecate chunked methods on `Converter`. | 15 * Introduce `ChunkedConverter` and deprecate chunked methods on `Converter`. |
16 | 16 |
| 17 * `dart:html` |
| 18 |
| 19 There have been a number of **BREAKING** changes to align APIs with recent |
| 20 changes in Chrome. These include: |
| 21 |
| 22 * Chrome's `ShadowRoot` interface no longer has the methods `getElementById`, |
| 23 `getElementsByClassName`, and `getElementsByTagName`, e.g., |
| 24 |
| 25 ```dart |
| 26 elem.shadowRoot.getElementsByClassName('clazz') |
| 27 ``` |
| 28 |
| 29 should become: |
| 30 |
| 31 ```dart |
| 32 elem.shadowRoot.querySelectorAll('.clazz') |
| 33 ``` |
| 34 |
| 35 * The `clipboardData` property has been removed from `KeyEvent` |
| 36 and `Event`. It has been moved to the new `ClipboardEvent` class, which is |
| 37 now used by `copy`, `cut`, and `paste` events. |
| 38 |
| 39 * The `layer` property has been removed from `KeyEvent` and |
| 40 `UIEvent`. It has been moved to `MouseEvent`. |
| 41 |
| 42 * The `Point get page` property has been removed from `UIEvent`. |
| 43 It still exists on `MouseEvent` and `Touch`. |
| 44 |
| 45 There have also been a number of other additions and removals to `dart:html`, |
| 46 `dart:indexed_db`, `dart:svg`, `dart:web_audio`, and `dart:web_gl` that |
| 47 correspond to changes to Chrome APIs between v39 and v45. Many of the breaking |
| 48 changes represent APIs that would have caused runtime exceptions when compiled |
| 49 to Javascript and run on recent Chrome releases. |
| 50 |
17 * `dart:io` | 51 * `dart:io` |
18 * Added `SecurityContext.alpnSupported`, which is true if a platform | 52 * Added `SecurityContext.alpnSupported`, which is true if a platform |
19 supports ALPN, and false otherwise. | 53 supports ALPN, and false otherwise. |
20 | 54 |
| 55 ### JavaScript interop |
| 56 |
| 57 For performance reasons, a potentially **BREAKING** change was added for |
| 58 libraries that use JS interop. |
| 59 Any Dart file that uses `@JS` annotations on declarations (top-level functions, |
| 60 classes or class members) to interop with JavaScript code will require that the |
| 61 file have the annotation `@JS()` on a library directive. |
| 62 |
| 63 ```dart |
| 64 @JS() |
| 65 library my_library; |
| 66 ``` |
| 67 |
| 68 The analyzer will enforce this by generating the error: |
| 69 |
| 70 The `@JS()` annotation can only be used if it is also declared on the library |
| 71 directive. |
| 72 |
| 73 If part file uses the `@JS()` annotation, the library that uses the part should |
| 74 have the `@JS()` annotation e.g., |
| 75 |
| 76 ```dart |
| 77 // library_1.dart |
| 78 @JS() |
| 79 library library_1; |
| 80 |
| 81 import 'package:js/js.dart'; |
| 82 |
| 83 part 'part_1.dart'; |
| 84 ``` |
| 85 |
| 86 ```dart |
| 87 // part_1.dart |
| 88 part of library_1; |
| 89 |
| 90 @JS("frameworkStabilizers") |
| 91 external List<FrameworkStabilizer> get frameworkStabilizers; |
| 92 ``` |
| 93 |
| 94 If your library already has a JS module e.g., |
| 95 |
| 96 ```dart |
| 97 @JS('array.utils') |
| 98 library my_library; |
| 99 ``` |
| 100 |
| 101 Then your library will work without any additional changes. |
| 102 |
21 ### Analyzer | 103 ### Analyzer |
22 | 104 |
23 * Static checking of `for in` statements. These will now produce static | 105 * Static checking of `for in` statements. These will now produce static |
24 warnings: | 106 warnings: |
25 | 107 |
26 ```dart | 108 ```dart |
27 // Not Iterable. | 109 // Not Iterable. |
28 for (var i in 1234) { ... } | 110 for (var i in 1234) { ... } |
29 | 111 |
30 // String cannot be assigned to int. | 112 // String cannot be assigned to int. |
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
898 they will keep the Dart process alive until they time out. This fixes the | 980 they will keep the Dart process alive until they time out. This fixes the |
899 handling of persistent connections. Previously, the client would shut down | 981 handling of persistent connections. Previously, the client would shut down |
900 immediately after a request. | 982 immediately after a request. |
901 | 983 |
902 * **Breaking change:** `HttpServer` no longer compresses all traffic by | 984 * **Breaking change:** `HttpServer` no longer compresses all traffic by |
903 default. The new `autoCompress` property can be set to `true` to re-enable | 985 default. The new `autoCompress` property can be set to `true` to re-enable |
904 compression. | 986 compression. |
905 | 987 |
906 * `dart:isolate`: `Isolate.spawnUri` added the optional `packageRoot` argument, | 988 * `dart:isolate`: `Isolate.spawnUri` added the optional `packageRoot` argument, |
907 which controls how it resolves `package:` URIs. | 989 which controls how it resolves `package:` URIs. |
OLD | NEW |