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

Side by Side Diff: lib/html/src/native_DOMImplementation.dart

Issue 11238035: Make isEmpty a getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/html/scripts/idlrenderer.dart ('k') | lib/html/templates/immutable_list_mixin.darttemplate » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 class _Utils { 5 class _Utils {
6 static List convertToList(List list) { 6 static List convertToList(List list) {
7 // FIXME: [possible optimization]: do not copy the array if Dart_IsArray is fine w/ it. 7 // FIXME: [possible optimization]: do not copy the array if Dart_IsArray is fine w/ it.
8 final length = list.length; 8 final length = list.length;
9 List result = new List(length); 9 List result = new List(length);
10 result.setRange(0, length, list); 10 result.setRange(0, length, list);
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 bool containsKey(String key) native "DOMStringMap_containsKey_Callback"; 96 bool containsKey(String key) native "DOMStringMap_containsKey_Callback";
97 String operator [](String key) native "DOMStringMap_item_Callback"; 97 String operator [](String key) native "DOMStringMap_item_Callback";
98 void operator []=(String key, String value) native "DOMStringMap_setItem_Callb ack"; 98 void operator []=(String key, String value) native "DOMStringMap_setItem_Callb ack";
99 String putIfAbsent(String key, String ifAbsent()) => Maps.putIfAbsent(this, ke y, ifAbsent); 99 String putIfAbsent(String key, String ifAbsent()) => Maps.putIfAbsent(this, ke y, ifAbsent);
100 String remove(String key) native "DOMStringMap_remove_Callback"; 100 String remove(String key) native "DOMStringMap_remove_Callback";
101 void clear() => Maps.clear(this); 101 void clear() => Maps.clear(this);
102 void forEach(void f(String key, String value)) => Maps.forEach(this, f); 102 void forEach(void f(String key, String value)) => Maps.forEach(this, f);
103 Collection<String> getKeys() native "DOMStringMap_getKeys_Callback"; 103 Collection<String> getKeys() native "DOMStringMap_getKeys_Callback";
104 Collection<String> getValues() => Maps.getValues(this); 104 Collection<String> getValues() => Maps.getValues(this);
105 int get length => Maps.length(this); 105 int get length => Maps.length(this);
106 bool isEmpty() => Maps.isEmpty(this); 106 bool get isEmpty => Maps.isEmpty(this);
107 } 107 }
108 108
109 get _printClosure => (s) { 109 get _printClosure => (s) {
110 try { 110 try {
111 window.console.log(s); 111 window.console.log(s);
112 } catch (_) { 112 } catch (_) {
113 _Utils.print(s); 113 _Utils.print(s);
114 } 114 }
115 }; 115 };
OLDNEW
« no previous file with comments | « lib/html/scripts/idlrenderer.dart ('k') | lib/html/templates/immutable_list_mixin.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698