| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of html; | 5 part of html; |
| 6 | 6 $ANNOTATIONS |
| 7 /// @domName $DOMNAME | |
| 8 class $CLASSNAME$EXTENDS implements Map<String, String> $NATIVESPEC { | 7 class $CLASSNAME$EXTENDS implements Map<String, String> $NATIVESPEC { |
| 9 | 8 |
| 10 // TODO(nweiz): update this when maps support lazy iteration | 9 // TODO(nweiz): update this when maps support lazy iteration |
| 11 bool containsValue(String value) => values.any((e) => e == value); | 10 bool containsValue(String value) => values.any((e) => e == value); |
| 12 | 11 |
| 13 bool containsKey(String key) => $dom_getItem(key) != null; | 12 bool containsKey(String key) => $dom_getItem(key) != null; |
| 14 | 13 |
| 15 String operator [](String key) => $dom_getItem(key); | 14 String operator [](String key) => $dom_getItem(key); |
| 16 | 15 |
| 17 void operator []=(String key, String value) { $dom_setItem(key, value); } | 16 void operator []=(String key, String value) { $dom_setItem(key, value); } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 48 final values = []; | 47 final values = []; |
| 49 forEach((k, v) => values.add(v)); | 48 forEach((k, v) => values.add(v)); |
| 50 return values; | 49 return values; |
| 51 } | 50 } |
| 52 | 51 |
| 53 int get length => $dom_length; | 52 int get length => $dom_length; |
| 54 | 53 |
| 55 bool get isEmpty => $dom_key(0) == null; | 54 bool get isEmpty => $dom_key(0) == null; |
| 56 $!MEMBERS | 55 $!MEMBERS |
| 57 } | 56 } |
| OLD | NEW |