Skip to content

IndexedDB upgradeNeeded not working in stable Chrome #6446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DartBot opened this issue Nov 1, 2012 · 1 comment
Closed

IndexedDB upgradeNeeded not working in stable Chrome #6446

DartBot opened this issue Nov 1, 2012 · 1 comment
Labels
closed-duplicate Closed in favor of an existing report

Comments

@DartBot
Copy link

DartBot commented Nov 1, 2012

This issue was originally filed by @sethladd


Consider this code:

  Future<bool> open() {
    Completer completer = new Completer();
    var request = window.indexedDB.open(dbName, version);
    request.on.success.add((e) => _onDbOpened(request.result, completer));
    request.on.error.add(_onError);
    request.on.upgradeNeeded.add((e) => _onUpgradeNeeded(request.transaction));
    return completer.future;
  }

If you compile this to JavaScript and run in Chrome 22, you'll get this error:
 "Uncaught TypeError: Object #<_IDBRequestEventsImpl> has no method 'get$upgradeNeeded' "

Note that our docs show upgradeNeeded as a valid option to use: http://api.dartlang.org/docs/bleeding_edge/dart_html/IDBOpenDBRequestEvents.html

We should polyfill the old setVersion with the new upgradeNeeded.

@rakudrama
Copy link
Member

Added Duplicate label.
Marked as being merged into #2603.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report
Projects
None yet
Development

No branches or pull requests

2 participants