| 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 _ConsoleVariables { | 7 class _ConsoleVariables { |
| 8 Map<String, Object> _data = new Map<String, Object>(); | 8 Map<String, Object> _data = new Map<String, Object>(); |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 * This method is used as Library prefixes include a trailing dot when using | 378 * This method is used as Library prefixes include a trailing dot when using |
| 379 * the C Dart debugger API. | 379 * the C Dart debugger API. |
| 380 */ | 380 */ |
| 381 static String stripTrailingDot(String str) => | 381 static String stripTrailingDot(String str) => |
| 382 (str != null && str[str.length - 1] == '.') ? str.substring(0, str.length -
1) : str; | 382 (str != null && str[str.length - 1] == '.') ? str.substring(0, str.length -
1) : str; |
| 383 | 383 |
| 384 static String addTrailingDot(String str) => '${str}.'; | 384 static String addTrailingDot(String str) => '${str}.'; |
| 385 | 385 |
| 386 static bool isNoSuchMethodError(obj) => obj is NoSuchMethodError; | 386 static bool isNoSuchMethodError(obj) => obj is NoSuchMethodError; |
| 387 | 387 |
| 388 // TODO(jacobr): we need a failsafe way to determine that a Node is really a | |
| 389 // DOM node rather than just a class that extends Node. | |
| 390 static bool isNode(obj) => obj is Node; | |
| 391 | |
| 392 static bool _isBuiltinType(ClassMirror cls) { | 388 static bool _isBuiltinType(ClassMirror cls) { |
| 393 // TODO(vsm): Find a less hackish way to do this. | 389 // TODO(vsm): Find a less hackish way to do this. |
| 394 LibraryMirror lib = cls.owner; | 390 LibraryMirror lib = cls.owner; |
| 395 String libName = lib.uri.toString(); | 391 String libName = lib.uri.toString(); |
| 396 return libName.startsWith('dart:'); | 392 return libName.startsWith('dart:'); |
| 397 } | 393 } |
| 398 | 394 |
| 399 static void register(Document document, String tag, Type type, | 395 static void register(Document document, String tag, Type type, |
| 400 String extendsTagName) { | 396 String extendsTagName) { |
| 401 // TODO(vsm): Move these checks into native code. | 397 // TODO(vsm): Move these checks into native code. |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 }; | 518 }; |
| 523 | 519 |
| 524 get _pureIsolateTimerFactoryClosure => | 520 get _pureIsolateTimerFactoryClosure => |
| 525 ((int milliSeconds, void callback(Timer time), bool repeating) => | 521 ((int milliSeconds, void callback(Timer time), bool repeating) => |
| 526 throw new UnimplementedError("Timers on background isolates " | 522 throw new UnimplementedError("Timers on background isolates " |
| 527 "are not supported in the browser")); | 523 "are not supported in the browser")); |
| 528 | 524 |
| 529 void _initializeCustomElement(Element e) { | 525 void _initializeCustomElement(Element e) { |
| 530 _Utils.initializeCustomElement(e); | 526 _Utils.initializeCustomElement(e); |
| 531 } | 527 } |
| OLD | NEW |