| 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 dart._js_helper; | 5 library dart._js_helper; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'dart:_debugger' show stackTraceMapper; | 9 import 'dart:_debugger' show stackTraceMapper; |
| 10 | 10 |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 const Returns(this.types); | 759 const Returns(this.types); |
| 760 } | 760 } |
| 761 | 761 |
| 762 /** | 762 /** |
| 763 * A metadata annotation placed on native methods and fields of native classes | 763 * A metadata annotation placed on native methods and fields of native classes |
| 764 * to specify the JavaScript name. | 764 * to specify the JavaScript name. |
| 765 * | 765 * |
| 766 * This example declares a Dart field + getter + setter called `$dom_title` that | 766 * This example declares a Dart field + getter + setter called `$dom_title` that |
| 767 * corresponds to the JavaScript property `title`. | 767 * corresponds to the JavaScript property `title`. |
| 768 * | 768 * |
| 769 * class Docmument native "*Foo" { | 769 * class Document native "*Foo" { |
| 770 * @JSName('title') | 770 * @JSName('title') |
| 771 * String $dom_title; | 771 * String $dom_title; |
| 772 * } | 772 * } |
| 773 */ | 773 */ |
| 774 class JSName { | 774 class JSName { |
| 775 final String name; | 775 final String name; |
| 776 const JSName(this.name); | 776 const JSName(this.name); |
| 777 } | 777 } |
| 778 | 778 |
| 779 /** | 779 /** |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 // we have no way of telling the compiler yet, so it will generate an extra | 916 // we have no way of telling the compiler yet, so it will generate an extra |
| 917 // layer of indirection that wraps the SyncIterator. | 917 // layer of indirection that wraps the SyncIterator. |
| 918 _jsIterator() => JS('', '#(...#)', _generator, _args); | 918 _jsIterator() => JS('', '#(...#)', _generator, _args); |
| 919 | 919 |
| 920 Iterator<E> get iterator => new SyncIterator<E>(_jsIterator()); | 920 Iterator<E> get iterator => new SyncIterator<E>(_jsIterator()); |
| 921 } | 921 } |
| 922 | 922 |
| 923 class BooleanConversionAssertionError extends AssertionError { | 923 class BooleanConversionAssertionError extends AssertionError { |
| 924 toString() => 'Failed assertion: boolean expression must not be null'; | 924 toString() => 'Failed assertion: boolean expression must not be null'; |
| 925 } | 925 } |
| OLD | NEW |