| 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 * This method is used as Library prefixes include a trailing dot when using | 383 * This method is used as Library prefixes include a trailing dot when using |
| 384 * the C Dart debugger API. | 384 * the C Dart debugger API. |
| 385 */ | 385 */ |
| 386 static String stripTrailingDot(String str) => | 386 static String stripTrailingDot(String str) => |
| 387 (str != null && str[str.length - 1] == '.') ? str.substring(0, str.length -
1) : str; | 387 (str != null && str[str.length - 1] == '.') ? str.substring(0, str.length -
1) : str; |
| 388 | 388 |
| 389 static String addTrailingDot(String str) => '${str}.'; | 389 static String addTrailingDot(String str) => '${str}.'; |
| 390 | 390 |
| 391 static bool isNoSuchMethodError(obj) => obj is NoSuchMethodError; | 391 static bool isNoSuchMethodError(obj) => obj is NoSuchMethodError; |
| 392 | 392 |
| 393 // TODO(jacobr): we need a failsafe way to determine that a Node is really a | |
| 394 // DOM node rather than just a class that extends Node. | |
| 395 static bool isNode(obj) => obj is Node; | |
| 396 | |
| 397 static bool _isBuiltinType(ClassMirror cls) { | 393 static bool _isBuiltinType(ClassMirror cls) { |
| 398 // TODO(vsm): Find a less hackish way to do this. | 394 // TODO(vsm): Find a less hackish way to do this. |
| 399 LibraryMirror lib = cls.owner; | 395 LibraryMirror lib = cls.owner; |
| 400 String libName = lib.uri.toString(); | 396 String libName = lib.uri.toString(); |
| 401 return libName.startsWith('dart:'); | 397 return libName.startsWith('dart:'); |
| 402 } | 398 } |
| 403 | 399 |
| 404 static void register(Document document, String tag, Type type, | 400 static void register(Document document, String tag, Type type, |
| 405 String extendsTagName) { | 401 String extendsTagName) { |
| 406 // TODO(vsm): Move these checks into native code. | 402 // TODO(vsm): Move these checks into native code. |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 _scheduleImmediateHelper._schedule(callback); | 567 _scheduleImmediateHelper._schedule(callback); |
| 572 }; | 568 }; |
| 573 | 569 |
| 574 get _pureIsolateScheduleImmediateClosure => ((void callback()) => | 570 get _pureIsolateScheduleImmediateClosure => ((void callback()) => |
| 575 throw new UnimplementedError("scheduleMicrotask in background isolates " | 571 throw new UnimplementedError("scheduleMicrotask in background isolates " |
| 576 "are not supported in the browser")); | 572 "are not supported in the browser")); |
| 577 | 573 |
| 578 void _initializeCustomElement(Element e) { | 574 void _initializeCustomElement(Element e) { |
| 579 _Utils.initializeCustomElement(e); | 575 _Utils.initializeCustomElement(e); |
| 580 } | 576 } |
| OLD | NEW |