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

Unified Diff: lib/dom/src/native_DOMImplementation.dart

Issue 10008048: Generate DOMStringMap implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
« no previous file with comments | « lib/dom/scripts/generator.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/src/native_DOMImplementation.dart
diff --git a/lib/dom/src/native_DOMImplementation.dart b/lib/dom/src/native_DOMImplementation.dart
index 611266e4c4a241c77c5725d32843a007d20670a0..aa0a3ccca2aebd3ef3eef8d7bcc8f9f7e0b7c99f 100644
--- a/lib/dom/src/native_DOMImplementation.dart
+++ b/lib/dom/src/native_DOMImplementation.dart
@@ -78,3 +78,21 @@ class LocationCrossFrameImplementation extends DOMWrapperBase implements Locatio
String get typeName() => "Location";
}
+
+class DOMStringMapImplementation extends DOMWrapperBase implements Map<String, String> {
+ static DOMStringMapImplementation _createDOMStringMapImplementation() => new DOMStringMapImplementation._createDOMStringMapImplementation();
+ DOMStringMapImplementation._createDOMStringMapImplementation();
+
+ bool containsValue(String value) => Maps.containsValue(this, value);
+ bool containsKey(String key) native "DOMStringMap_containsKey_Callback";
+ String operator [](String key) native "DOMStringMap_item_Callback";
+ void operator []=(String key, String value) native "DOMStringMap_setItem_Callback";
+ String putIfAbsent(String key, String ifAbsent()) => Maps.putIfAbsent(this, key, ifAbsent);
+ String remove(String key) native "DOMStringMap_remove_Callback";
+ void clear() => Maps.clear(this);
+ void forEach(void f(String key, String value)) => Maps.forEach(this, f);
+ Collection<String> getKeys() native "DOMStringMap_getKeys_Callback";
+ Collection<String> getValues() => Maps.getValues(this);
+ int get length() => Maps.length(this);
+ bool isEmpty() => Maps.isEmpty(this);
+}
« no previous file with comments | « lib/dom/scripts/generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698