| Index: lib/html/dartium/html_dartium.dart
|
| diff --git a/lib/html/dartium/html_dartium.dart b/lib/html/dartium/html_dartium.dart
|
| index 1a8e35d3a5862a7129cdb725a195f49c26964e14..da0d379f031e32a4292bf50ff0552e6694c24712 100644
|
| --- a/lib/html/dartium/html_dartium.dart
|
| +++ b/lib/html/dartium/html_dartium.dart
|
| @@ -18388,8 +18388,54 @@ class _SpeechRecognitionResultListImpl extends _DOMTypeBase implements SpeechRec
|
| return _wrap(_ptr.item(_unwrap(index)));
|
| }
|
| }
|
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
|
|
| class _StorageImpl extends _DOMTypeBase implements Storage {
|
| +
|
| + // TODO(nweiz): update this when maps support lazy iteration
|
| + bool containsValue(String value) => getValues().some((e) => e == value);
|
| +
|
| + bool containsKey(String key) => getItem(key) != null;
|
| +
|
| + String operator [](String key) => getItem(key);
|
| +
|
| + void operator []=(String key, String value) => setItem(key, value);
|
| +
|
| + String putIfAbsent(String key, String ifAbsent()) {
|
| + if (!containsKey(key)) this[key] = ifAbsent();
|
| + return this[key];
|
| + }
|
| +
|
| + String remove(String key) {
|
| + final value = this[key];
|
| + removeItem(key);
|
| + return value;
|
| + }
|
| +
|
| + void forEach(void f(String key, String value)) {
|
| + for (var i = 0; true; i++) {
|
| + final key = key(i);
|
| + if (key == null) return;
|
| +
|
| + f(key, this[key]);
|
| + }
|
| + }
|
| +
|
| + Collection<String> getKeys() {
|
| + final keys = [];
|
| + forEach((k, v) => keys.add(k));
|
| + return keys;
|
| + }
|
| +
|
| + Collection<String> getValues() {
|
| + final values = [];
|
| + forEach((k, v) => values.add(v));
|
| + return values;
|
| + }
|
| +
|
| + bool isEmpty() => key(0) == null;
|
| _StorageImpl._wrap(ptr) : super._wrap(ptr);
|
|
|
| int get length() => _wrap(_ptr.length);
|
| @@ -18416,6 +18462,7 @@ class _StorageImpl extends _DOMTypeBase implements Storage {
|
| _ptr.setItem(_unwrap(key), _unwrap(data));
|
| return;
|
| }
|
| +
|
| }
|
|
|
| class _StorageEventImpl extends _EventImpl implements StorageEvent {
|
| @@ -33759,9 +33806,8 @@ interface SpeechRecognitionResultList {
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -// WARNING: Do not edit - generated code.
|
| -
|
| -interface Storage {
|
| +interface Storage extends Map<String, String> {
|
| +/*
|
|
|
| final int length;
|
|
|
| @@ -33774,6 +33820,8 @@ interface Storage {
|
| void removeItem(String key);
|
|
|
| void setItem(String key, String data);
|
| +
|
| +*/
|
| }
|
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
|
|