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

Side by Side Diff: tools/dom/src/html_native_DOMImplementation.dart

Issue 414193002: Add parseJson to DartUtilities. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/html/html.status ('k') | no next file » | 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 part of html; 5 part of html;
6 6
7 class _Property { 7 class _Property {
8 _Property(this.name) : 8 _Property(this.name) :
9 _hasValue = false, 9 _hasValue = false,
10 writable = false, 10 writable = false,
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 result[list[i]] = list[i + 1]; 155 result[list[i]] = list[i + 1];
156 } 156 }
157 } 157 }
158 158
159 static bool isMap(obj) => obj is Map; 159 static bool isMap(obj) => obj is Map;
160 160
161 static List toListIfIterable(obj) => obj is Iterable ? obj.toList() : null; 161 static List toListIfIterable(obj) => obj is Iterable ? obj.toList() : null;
162 162
163 static Map createMap() => {}; 163 static Map createMap() => {};
164 164
165 static parseJson(String jsonSource) => const JsonDecoder().convert(jsonSource) ;
166
165 static makeUnimplementedError(String fileName, int lineNo) { 167 static makeUnimplementedError(String fileName, int lineNo) {
166 return new UnsupportedError('[info: $fileName:$lineNo]'); 168 return new UnsupportedError('[info: $fileName:$lineNo]');
167 } 169 }
168 170
169 static bool isTypeSubclassOf(Type type, Type other) { 171 static bool isTypeSubclassOf(Type type, Type other) {
170 if (type == other) { 172 if (type == other) {
171 return true; 173 return true;
172 } 174 }
173 var superclass = reflectClass(type).superclass; 175 var superclass = reflectClass(type).superclass;
174 if (superclass != null) { 176 if (superclass != null) {
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 _scheduleImmediateHelper._schedule(callback); 983 _scheduleImmediateHelper._schedule(callback);
982 }; 984 };
983 985
984 get _pureIsolateScheduleImmediateClosure => ((void callback()) => 986 get _pureIsolateScheduleImmediateClosure => ((void callback()) =>
985 throw new UnimplementedError("scheduleMicrotask in background isolates " 987 throw new UnimplementedError("scheduleMicrotask in background isolates "
986 "are not supported in the browser")); 988 "are not supported in the browser"));
987 989
988 void _initializeCustomElement(Element e) { 990 void _initializeCustomElement(Element e) {
989 _Utils.initializeCustomElement(e); 991 _Utils.initializeCustomElement(e);
990 } 992 }
OLDNEW
« no previous file with comments | « tests/html/html.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698