javascriptweb-sqlgoogle-chrome-app

Uncaught ReferenceError: openDatabase is not defined


I am trying to use openDatabase with a Google Chrome app but the following error is displayed:

Uncaught ReferenceError: openDatabase is not defined

I also added permissions (unlimitedStorage) in manifest.json.


Solution

  • WebSQL is disabled for Chrome apps, as you can see in the documentation.

    If you want to save data persistently, use the chrome.storage API, IndexedDB or the chrome.fileSystem API (not to be confused with the HTML5 Filesystem API!).