OLD | NEW |
1 import 'dart:core' as core; // import with prefix so global dart:core fields don
't appear in scope chain. | 1 import 'dart:core' as core; // import with prefix so global dart:core fields don
't appear in scope chain. |
2 import 'dart:html' as html; // import with prefix so global dart:html fields don
't appear in scope chain. | 2 import 'dart:html' as html; // import with prefix so global dart:html fields don
't appear in scope chain. |
3 | 3 |
4 main() { | 4 main() { |
5 html.window.onMessage.listen(handleMessage); | 5 html.window.onMessage.listen(handleMessage); |
6 } | 6 } |
7 | 7 |
8 handleMessage(event) { | 8 handleMessage(event) { |
9 if (event.data == 'fromJS') { | 9 if (event.data == 'fromJS') { |
10 handleMessage2(event); | 10 handleMessage2(event); |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 A(this.d) {} | 28 A(this.d) {} |
29 | 29 |
30 toString() { | 30 toString() { |
31 return "[Instance of A, d = $d]"; | 31 return "[Instance of A, d = $d]"; |
32 } | 32 } |
33 } | 33 } |
34 | 34 |
35 var globalVariable = 'globalString'; | 35 var globalVariable = 'globalString'; |
36 | 36 |
| 37 var globalMapVariable = {'foo': 'bar', 'baz': 42}; |
| 38 |
| 39 var globalArrayVariable = [3, 1, 4, 1, 5, 9]; |
| 40 |
37 String get throwingGetter { | 41 String get throwingGetter { |
38 throw 'only the best reviews'; | 42 throw 'only the best reviews'; |
39 } | 43 } |
| 44 |
| 45 html.DivElement get exampleDivGetter => html.query("#example_div"); |
OLD | NEW |