Future<IdbFactory> deleteDatabase(String name, {void onBlocked(Event e)}) { try { var request = _deleteDatabase(name); if (onBlocked != null) { request.onBlocked.listen(onBlocked); } var completer = new Completer<IdbFactory>.sync(); request.onSuccess.listen((e) { completer.complete(this); }); request.onError.listen(completer.completeError); return completer.future; } catch (e, stacktrace) { return new Future.error(e, stacktrace); } }
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-indexed_db/IdbFactory/deleteDatabase.html