Skip to content

breaking change: removing WebSQL APIs #46316

@sigmundch

Description

@sigmundch

The WebSQL standard was abandoned more than 10 years ago and is not supported by many browsers.

The dart:web_sql library has been documented as unsupported and deprecated for several years as well and but wasn't annotated properly. Since Dart 2.14 dart:web_sql and the related window.openDatabase API exposed by dart:html have been marked deprecated.

We plan to completely remove these APIs in a future Dart release, likely in Dart 2.15.

What can break?

Any app that imports dart:web_sql or that uses window.openDatabase would start seeing compile-time errors.

Mitigation

The main mitigation is to remove any imports to dart:web_sql and uses of window.openDatabase.

We don't expect uses of these APIs though, given how the underlying functionality is missing in many browsers. If however, such uses exist (say for a chrome-only app), the recommendation is to switch to use either web storage or indexeddb.

We did a study in internal systems and in 15K external packages (using pub_crawl) and didn't find any relevant uses of these APIs. We found only two benign matches: one in a discontinued package, and one in a autogenerated library that mocks dart:html and reachable libraries.

@franklinyow @vsmenon @mit-mit @kevmoo

@grouma @Hixie - for approvals

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work onarea-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.breaking-change-requestThis tracks requests for feedback on breaking changesweb-librariesIssues impacting dart:html, etc., libraries

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions