Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: tools/dom/templates/html/impl/impl_Storage.darttemplate

Issue 1894713002: Strong html (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: ptal Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/dom/templates/html/impl/impl_Storage.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Storage.darttemplate b/tools/dom/templates/html/impl/impl_Storage.darttemplate
index ff99d70896d41a2b5ccc7b69d12f3cc4e831d360..609355e29c04695e98c487a9efedffeb4d97db78 100644
--- a/tools/dom/templates/html/impl/impl_Storage.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Storage.darttemplate
@@ -37,11 +37,11 @@ $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS
}
// TODO(nweiz): update this when maps support lazy iteration
- bool containsValue(String value) => values.any((e) => e == value);
+ bool containsValue(Object value) => values.any((e) => e == value);
- bool containsKey(String key) => _getItem(key) != null;
+ bool containsKey(Object key) => _getItem(key) != null;
- String operator [](String key) => _getItem(key);
+ String operator [](Object key) => _getItem(key);
void operator []=(String key, String value) { _setItem(key, value); }
@@ -50,7 +50,7 @@ $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS
return this[key];
}
- String remove(String key) {
+ String remove(Object key) {
final value = this[key];
_removeItem(key);
return value;
@@ -68,13 +68,13 @@ $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS
}
Iterable<String> get keys {
- final keys = [];
+ final keys = <String>[];
forEach((k, v) => keys.add(k));
return keys;
}
Iterable<String> get values {
- final values = [];
+ final values = <String>[];
forEach((k, v) => values.add(v));
return values;
}
« no previous file with comments | « tools/dom/templates/html/impl/impl_Node.darttemplate ('k') | tools/dom/templates/html/impl/impl_Window.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698