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 |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |