Skip to content

Commit d52475c

Browse files
sigmundchcommit-bot@chromium.org
authored andcommitted
[web] deprecate dart:web_sql
The WebSql was dropped 5+ years ago and this library is unsupported. This change adds the `@deprecated` annotation on the library and APIs in dart:html that expose it (`window.openDatabase`). It also indicates to dartdoc to skip it for the api.dart.dev site. I run a `pub_crawl` process to verify that this is not in use. I checked 15K packages, and only found 2 occurrances of an import to this library: * One in a package marked as discontinued (used for migrating constants back in Dart 2) * Another in an example mock test (generated by mockito for mocking dart:html) Also no library uses `window.openDatabase` either. We will send a breaking change announcement soon and plan to delete this in a future Dart release (possibly 2.15). Fixes #45687 Fixes #45688 Change-Id: I8cd2bfa0ce64892c3f108bd6e24b8a0a3ec7c6ed Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196461 Reviewed-by: Srujan Gaddam <[email protected]> Commit-Queue: Sigmund Cherem <[email protected]>
1 parent a9159af commit d52475c

File tree

5 files changed

+17
-0
lines changed

5 files changed

+17
-0
lines changed

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@
1414
daylight saving changes that are not precisely one hour.
1515
(No change on the Web which uses the JavaScript `Date` object.)
1616

17+
#### `dart:web_sql`
18+
19+
* `dart:web_sql` is marked deprecated and will be removed in an upcoming
20+
release. Also the API `window.openDatabase` in `dart:html` is deprecated as
21+
well.
22+
23+
This API and library was exposing the WebSQL proposed standard. The standard
24+
was abandoned more than 5 years ago and is not supported by most browsers.
25+
The `dart:web_sql` library has been documented as unsupported and deprecated
26+
for many years as well and but wasn't annotated properly until now.
27+
1728
### Dart VM
1829

1930
* **Breaking Change** [#45071][]: `Dart_NewWeakPersistentHandle`'s and

sdk/lib/html/dart2js/html_dart2js.dart

+1
Original file line numberDiff line numberDiff line change
@@ -33660,6 +33660,7 @@ class Window extends EventTarget
3366033660
@SupportedBrowser(SupportedBrowser.CHROME)
3366133661
@SupportedBrowser(SupportedBrowser.SAFARI)
3366233662
@Creates('SqlDatabase')
33663+
@deprecated
3366333664
SqlDatabase openDatabase(
3366433665
String name, String version, String displayName, int estimatedSize,
3366533666
[DatabaseCallback? creationCallback]) {

sdk/lib/web_sql/dart2js/web_sql_dart2js.dart

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* The [dart:indexed_db] APIs is a recommended alternatives.
1010
*
1111
* {@category Web}
12+
* {@nodoc}
1213
*/
1314
library dart.dom.web_sql;
1415

@@ -23,6 +24,7 @@ import 'dart:_interceptors' show Interceptor;
2324
// https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation
2425
// Auto-generated dart:audio library.
2526

27+
@deprecated
2628
import 'dart:_js_helper'
2729
show
2830
applyExtension,

tools/dom/templates/html/dart2js/web_sql_dart2js.darttemplate

+2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
* The [dart:indexed_db] APIs is a recommended alternatives.
1414
*
1515
* {@category Web}
16+
* {@nodoc}
1617
*/
18+
@deprecated
1719
library dart.dom.web_sql;
1820

1921
import 'dart:async';

tools/dom/templates/html/impl/impl_Window.darttemplate

+1
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ $!MEMBERS
226226
@SupportedBrowser(SupportedBrowser.CHROME)
227227
@SupportedBrowser(SupportedBrowser.SAFARI)
228228
@Creates('SqlDatabase')
229+
@deprecated
229230
SqlDatabase openDatabase(
230231
String name, String version, String displayName, int estimatedSize,
231232
[DatabaseCallback$NULLABLE creationCallback]) {

0 commit comments

Comments
 (0)