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>list_test</title> | |
12 <script type='application/javascript' src="testing.js"></script> | 11 <script type='application/javascript' src="testing.js"></script> |
13 </head> | 12 </head> |
14 <body> | 13 <body> |
15 You should see the list items "a" and "b" repeated 3 times each. | 14 You should see the list items "a" and "b" repeated 3 times each. |
16 <template iterate="item in loopItemList"> | 15 <template iterate="item in loopItemList"> |
17 <span>{{item}}</span> | 16 <span>{{item}}</span> |
18 <template if="notCond"><span>{{item}}</span></template> | 17 <template if="notCond"><span>{{item}}</span></template> |
19 <span template if="cond">{{item}}</span> | 18 <span template if="cond">{{item}}</span> |
20 <span>{{item}}</span> | 19 <span>{{item}}</span> |
21 </template> | 20 </template> |
22 <p>Now you should see: "abc" "def" "abc" "def". | 21 <p>Now you should see: "abc" "def" "abc" "def". |
23 This tests what happens when the "iterate" does not have data binding inside. | 22 This tests what happens when the "iterate" does not have data binding inside. |
24 <template iterate="item in loopItemList"> | 23 <template iterate="item in loopItemList"> |
25 <span>abc</span> | 24 <span>abc</span> |
26 <span>def</span> | 25 <span>def</span> |
27 </template> | 26 </template> |
28 <script type="application/dart"> | 27 <script type="application/dart"> |
29 import 'dart:html'; | 28 import 'dart:html'; |
30 import 'common.dart'; | 29 import 'common.dart'; |
31 main() { | 30 main() { |
32 window.setTimeout(() => window.postMessage('done', '*'), 0); | 31 window.setImmediate(() => window.postMessage('done', '*')); |
33 } | 32 } |
34 </script> | 33 </script> |
35 </body> | 34 </body> |
36 </html> | 35 </html> |
OLD | NEW |