Pin package:web 0.4.0 (#138428)

This version is needed so that dart:js_interop can move to extension
types. Also adds some code to handle some breaking changes:

- Body -> Response. Body was an IDL interface mixin type we exposed in
dart:html. Going forward, users should either use Request or Response.
- Casts to JSAny. These are temporary until we move package:web types to
extension types. Currently, package:web types can't implement JSObject
as JSObject will move to be an extension type itself.

Co-authored-by: Kevin Moore <kevmoo@users.noreply.github.com>
This commit is contained in:
Srujan Gaddam
2023-11-15 15:03:21 -08:00
committed by GitHub
parent 82a7a62b45
commit d8ffc7390c
63 changed files with 126 additions and 124 deletions

View File

@@ -46,7 +46,7 @@ class BenchImageDecoding extends RawRecorder {
}
for (final String imageUrl in _imageUrls) {
final Future<JSAny?> fetchFuture = web.window.fetch(imageUrl.toJS).toDart;
final web.Body image = (await fetchFuture)! as web.Body;
final web.Response image = (await fetchFuture)! as web.Response;
final Future<JSAny?> imageFuture = image.arrayBuffer().toDart;
final JSArrayBuffer imageBuffer = (await imageFuture)! as JSArrayBuffer;
_imageData.add(imageBuffer.toDart.asUint8List());