| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 4 for details. All rights reserved. Use of this source code is governed by a | 4 for details. All rights reserved. Use of this source code is governed by a |
| 5 BSD-style license that can be found in the LICENSE file. | 5 BSD-style license that can be found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 <html lang="en"> | 7 <html lang="en"> |
| 8 <head> | 8 <head> |
| 9 <meta charset="utf-8"> | 9 <meta charset="utf-8"> |
| 10 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | 10 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| 11 <title>watch_global_var_test</title> | 11 <title>watch_global_var_test</title> |
| 12 <!-- use ../input/ so that the url also works from the output directory --> | 12 <script type='application/javascript' src="testing.js"></script> |
| 13 <script type='application/javascript' src="../input/testing.js"></script> | |
| 14 </head> | 13 </head> |
| 15 <body> | 14 <body> |
| 16 <template instantiate="if cond"> | 15 <template instantiate="if cond"> |
| 17 <span>you should see: yes</span> | 16 <span>you should see: yes</span> |
| 18 </template> | 17 </template> |
| 19 <template instantiate="if notCond"> | 18 <template instantiate="if notCond"> |
| 20 <span>you should not see: no</span> | 19 <span>you should not see: no</span> |
| 21 </template> | 20 </template> |
| 22 <script type="application/dart"> | 21 <script type="application/dart"> |
| 23 import 'dart:html'; | 22 import 'dart:html'; |
| 24 import 'package:web_components/watcher.dart'; | 23 import 'package:web_components/watcher.dart'; |
| 25 import '../input/common.dart'; | 24 import 'common.dart'; |
| 26 | 25 |
| 27 main() { | 26 main() { |
| 28 window.setTimeout(() { | 27 window.setTimeout(() { |
| 29 cond = true; | 28 cond = true; |
| 30 dispatch(); | 29 dispatch(); |
| 31 // in the end, we should see 'yes' | 30 // in the end, we should see 'yes' |
| 32 window.setTimeout(() => window.postMessage('done', '*'), 0); | 31 window.setTimeout(() => window.postMessage('done', '*'), 0); |
| 33 }, 0); | 32 }, 0); |
| 34 } | 33 } |
| 35 </script> | 34 </script> |
| 36 </body> | 35 </body> |
| 37 </html> | 36 </html> |
| OLD | NEW |