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 #import('dart:html'); | 5 import 'dart:html'; |
6 #import('template.dart'); | 6 import 'template.dart'; |
7 #import('../lib/file_system_memory.dart'); | 7 import '../lib/file_system_memory.dart'; |
8 | 8 |
9 String currSampleTemplate; | 9 String currSampleTemplate; |
10 | 10 |
11 void changeTemplate() { | 11 void changeTemplate() { |
12 final Document doc = window.document; | 12 final Document doc = window.document; |
13 final SelectElement samples = doc.query('#templateSamples'); | 13 final SelectElement samples = doc.query('#templateSamples'); |
14 final TextAreaElement template = doc.query('#template'); | 14 final TextAreaElement template = doc.query('#template'); |
15 template.value = sample(samples.value); | 15 template.value = sample(samples.value); |
16 } | 16 } |
17 | 17 |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 initHtmlWorld(false); | 564 initHtmlWorld(false); |
565 | 565 |
566 // Don't display any colors in the UI. | 566 // Don't display any colors in the UI. |
567 options.useColors = false; | 567 options.useColors = false; |
568 | 568 |
569 // Replace error handler bring up alert for any problems. | 569 // Replace error handler bring up alert for any problems. |
570 world.printHandler = (String msg) { | 570 world.printHandler = (String msg) { |
571 window.alert(msg); | 571 window.alert(msg); |
572 }; | 572 }; |
573 } | 573 } |
OLD | NEW |