diff --git a/CHANGELOG.md b/CHANGELOG.md index daf19d2cff7..9e7bdf925ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,101 +3,132 @@ #### `dart:html` Fixed Service Workers and any Promise/Future API with a Dictionary parameter. -APIs in dart:html (that take a Dictionary) will receive a Dart Map parameter. The Map parameter -must be converted to a Dictionary before passing to the browser's API. Before this change, -any Promise/Future API with a Map/Dictionary parameter never called the Promise and didn't -return a Dart Future - now it does. +APIs in dart:html (that take a Dictionary) will receive a Dart Map parameter. +The Map parameter must be converted to a Dictionary before passing to the +browser's API. Before this change, any Promise/Future API with a +Map/Dictionary parameter never called the Promise and didn't return a Dart +Future - now it does. -This caused a number of breaks especially in Service Workers (register, etc.). Here is a -complete list of the fixed APIs: +This caused a number of breaks especially in Service Workers (register, etc.). +Here is a complete list of the fixed APIs: -BackgroundFetchManager - Future fetch(String id, Object requests, [Map options]) +* BackgroundFetchManager + * `Future fetch(String id, Object requests, [Map options])` -CacheStorage - Future match(/*RequestInfo*/ request, [Map options]) +* CacheStorage + * `Future match(/*RequestInfo*/ request, [Map options])` -CanMakePayment - Future> matchAll([Map options]) +* CanMakePayment + * `Future> matchAll([Map options])` -CookieStore - Future getAll([Map options]) - Future set(String name, String value, [Map options]) +* CookieStore + * `Future getAll([Map options])` + * `Future set(String name, String value, [Map options])` -CredentialsContainer - Future get([Map options]) - Future create([Map options]) +* CredentialsContainer + * `Future get([Map options])` + * `Future create([Map options])` -ImageCapture - Future setOptions(Map photoSettings) +* ImageCapture + * `Future setOptions(Map photoSettings)` -MediaCapabilities - Future decodingInfo(Map configuration) - Future encodingInfo(Map configuration) +* MediaCapabilities + * `Future decodingInfo(Map configuration)` + * `Future encodingInfo(Map configuration)` -MediaStreamTrack - Future applyConstraints([Map constraints]) +* MediaStreamTrack + * `Future applyConstraints([Map constraints])` -Navigator - Future requestKeyboardLock([List keyCodes]) - Future requestMidiAccess([Map options]) - Future share([Map data]) +* Navigator + * `Future requestKeyboardLock([List keyCodes])` + * `Future requestMidiAccess([Map options])` + * `Future share([Map data])` -OffscreenCanvas - Future convertToBlob([Map options]) +* OffscreenCanvas + * `Future convertToBlob([Map options])` -PaymentInstruments - Future set(String instrumentKey, Map details) +* PaymentInstruments + * `Future set(String instrumentKey, Map details)` -Permissions - Future query(Map permission) - Future request(Map permissions) - Future revoke(Map permission) +* Permissions + * `Future query(Map permission)` + * `Future request(Map permissions)` + * `Future revoke(Map permission)` -PushManager - Future permissionState([Map options]) - Future subscribe([Map options]) +* PushManager + * `Future permissionState([Map options])` + * `Future subscribe([Map options])` -RtcPeerConnection - * **CHANGED** Future createAnswer([options_OR_successCallback, - RtcPeerConnectionErrorCallback failureCallback, - Map mediaConstraints]) - Future createAnswer([Map options]) - * **CHANGED** Future createOffer([options_OR_successCallback, - RtcPeerConnectionErrorCallback failureCallback, - Map rtcOfferOptions]) - Future createOffer([Map options]) - * **CHANGED** Future setLocalDescription(Map description, VoidCallback successCallback, - [RtcPeerConnectionErrorCallback failureCallback]) - Future setLocalDescription(Map description) - * **CHANGED** Future setLocalDescription(Map description, VoidCallback successCallback, - [RtcPeerConnectionErrorCallback failureCallback]) - Future setRemoteDescription(Map description) +* RtcPeerConnection + * **CHANGED** -ServiceWorkerContainer - Future register(String url, [Map options]) + ```dart + Future createAnswer([options_OR_successCallback, + RtcPeerConnectionErrorCallback failureCallback, + Map mediaConstraints]) + ``` -ServiceWorkerRegistration - Future> getNotifications([Map filter]) - Future showNotification(String title, [Map options]) + to -VRDevice - Future requestSession([Map options]) - Future supportsSession([Map options]) + `Future createAnswer([Map options])` -VRSession - Future requestFrameOfReference(String type, [Map options]) + * **CHANGED** -Window - Future fetch(/*RequestInfo*/ input, [Map init]) + ```dart + Future createOffer([options_OR_successCallback, + RtcPeerConnectionErrorCallback failureCallback, + Map rtcOfferOptions]) + ``` -WorkerGlobalScope - Future fetch(/*RequestInfo*/ input, [Map init]) + to -In addition, exposed Service Worker "self" as a static getter named "instance". The -instance is exposed on four different Service Worker classes and can throw a InstanceTypeError -if the instance isn't of the class expected (WorkerGlobalScope.instance will always work -and not throw): + `Future createOffer([Map options])` + + * **CHANGED** + + ```dart + Future setLocalDescription(Map description, VoidCallback successCallback, + [RtcPeerConnectionErrorCallback failureCallback]) + ``` + + to + + `Future setLocalDescription(Map description)` + * **CHANGED** + + ```dart + Future setLocalDescription(Map description, VoidCallback successCallback, + [RtcPeerConnectionErrorCallback failureCallback]) + ``` + + to + + `Future setRemoteDescription(Map description)` + +* ServiceWorkerContainer + * `Future register(String url, [Map options])` + +* ServiceWorkerRegistration + * `Future> getNotifications([Map filter])` + * `Future showNotification(String title, [Map options])` + +* VRDevice + * `Future requestSession([Map options])` + * `Future supportsSession([Map options])` + +* VRSession + * `Future requestFrameOfReference(String type, [Map options])` + +* Window + * `Future fetch(/*RequestInfo*/ input, [Map init])` + +* WorkerGlobalScope + * `Future fetch(/*RequestInfo*/ input, [Map init])` + +In addition, exposed Service Worker "self" as a static getter named "instance". +The instance is exposed on four different Service Worker classes and can throw +a InstanceTypeError if the instance isn't of the class expected +(WorkerGlobalScope.instance will always work and not throw): * SharedWorkerGlobalScope.instance * DedicatedWorkerGlobalScope.instance