deleteDatabase method

  1. @DomName('IDBFactory.deleteDatabase')
Future<IdbFactory> deleteDatabase(String name, { void onBlocked(Event e) })

Source

@DomName('IDBFactory.deleteDatabase')
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/1.24.3/dart-indexed_db/IdbFactory/deleteDatabase.html