| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library _js_helper; | 5 library _js_helper; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:_isolate_helper' show | 8 import 'dart:_isolate_helper' show |
| 9 IsolateNatives, | 9 IsolateNatives, |
| 10 leaveJsAsync, | 10 leaveJsAsync, |
| (...skipping 2771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2782 | 2782 |
| 2783 /** | 2783 /** |
| 2784 * Error thrown when a runtime error occurs. | 2784 * Error thrown when a runtime error occurs. |
| 2785 */ | 2785 */ |
| 2786 class RuntimeError extends Error { | 2786 class RuntimeError extends Error { |
| 2787 final message; | 2787 final message; |
| 2788 RuntimeError(this.message); | 2788 RuntimeError(this.message); |
| 2789 String toString() => "RuntimeError: $message"; | 2789 String toString() => "RuntimeError: $message"; |
| 2790 } | 2790 } |
| 2791 | 2791 |
| 2792 class DeferredNotLoadedError extends Error { | 2792 class DeferredNotLoadedError extends Error implements NoSuchMethodError { |
| 2793 String libraryName; | 2793 String libraryName; |
| 2794 | 2794 |
| 2795 DeferredNotLoadedError(this.libraryName); | 2795 DeferredNotLoadedError(this.libraryName); |
| 2796 | 2796 |
| 2797 String toString() { | 2797 String toString() { |
| 2798 return "Deferred library $libraryName was not loaded."; | 2798 return "Deferred library $libraryName was not loaded."; |
| 2799 } | 2799 } |
| 2800 } | 2800 } |
| 2801 | 2801 |
| 2802 abstract class RuntimeType { | 2802 abstract class RuntimeType { |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3312 JS('', '#.addEventListener("error", #, false)', | 3312 JS('', '#.addEventListener("error", #, false)', |
| 3313 script, convertDartClosureToJS((event) { | 3313 script, convertDartClosureToJS((event) { |
| 3314 completer.completeError( | 3314 completer.completeError( |
| 3315 new DeferredLoadException("Loading $uri failed.")); | 3315 new DeferredLoadException("Loading $uri failed.")); |
| 3316 }, 1)); | 3316 }, 1)); |
| 3317 JS('', 'document.body.appendChild(#)', script); | 3317 JS('', 'document.body.appendChild(#)', script); |
| 3318 | 3318 |
| 3319 return completer.future; | 3319 return completer.future; |
| 3320 }); | 3320 }); |
| 3321 } | 3321 } |
| OLD | NEW |