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

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

Issue 21676003: Add method to html_dartium utils to check for NSM errors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « sdk/lib/html/dartium/html_dartium.dart ('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 _Utils { 7 class _Utils {
8 static double dateTimeToDouble(DateTime dateTime) => 8 static double dateTimeToDouble(DateTime dateTime) =>
9 dateTime.millisecondsSinceEpoch.toDouble(); 9 dateTime.millisecondsSinceEpoch.toDouble();
10 static DateTime doubleToDateTime(double dateTime) { 10 static DateTime doubleToDateTime(double dateTime) {
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 /** 182 /**
183 * Removes the trailing dot from an expression ending in a dot. 183 * Removes the trailing dot from an expression ending in a dot.
184 * This method is used as Library prefixes include a trailing dot when using 184 * This method is used as Library prefixes include a trailing dot when using
185 * the C Dart debugger API. 185 * the C Dart debugger API.
186 */ 186 */
187 static String stripTrailingDot(String str) => 187 static String stripTrailingDot(String str) =>
188 (str != null && str[str.length - 1] == '.') ? str.substring(0, str.length - 1) : str; 188 (str != null && str[str.length - 1] == '.') ? str.substring(0, str.length - 1) : str;
189 189
190 static String addTrailingDot(String str) => '${str}.'; 190 static String addTrailingDot(String str) => '${str}.';
191 191
192 static bool isNoSuchMethodError(obj) => obj is NoSuchMethodError;
193
192 // TODO(jacobr): we need a failsafe way to determine that a Node is really a 194 // TODO(jacobr): we need a failsafe way to determine that a Node is really a
193 // DOM node rather than just a class that extends Node. 195 // DOM node rather than just a class that extends Node.
194 static bool isNode(obj) => obj is Node; 196 static bool isNode(obj) => obj is Node;
195 } 197 }
196 198
197 class _NPObject extends NativeFieldWrapperClass1 { 199 class _NPObject extends NativeFieldWrapperClass1 {
198 _NPObject.internal(); 200 _NPObject.internal();
199 static _NPObject retrieve(String key) native "NPObject_retrieve"; 201 static _NPObject retrieve(String key) native "NPObject_retrieve";
200 property(String propertyName) native "NPObject_property"; 202 property(String propertyName) native "NPObject_property";
201 invoke(String methodName, [List args = null]) native "NPObject_invoke"; 203 invoke(String methodName, [List args = null]) native "NPObject_invoke";
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 _send(msg) { 388 _send(msg) {
387 _sendToHelperIsolate(msg, _sendPort); 389 _sendToHelperIsolate(msg, _sendPort);
388 } 390 }
389 391
390 bool get isActive => _isActive; 392 bool get isActive => _isActive;
391 } 393 }
392 394
393 get _pureIsolateTimerFactoryClosure => 395 get _pureIsolateTimerFactoryClosure =>
394 ((int milliSeconds, void callback(Timer time), bool repeating) => 396 ((int milliSeconds, void callback(Timer time), bool repeating) =>
395 new _PureIsolateTimer(milliSeconds, callback, repeating)); 397 new _PureIsolateTimer(milliSeconds, callback, repeating));
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698