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 template_binding.test.utils; | 5 library template_binding.test.utils; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:html'; | 8 import 'dart:html'; |
9 import 'package:observe/observe.dart'; | 9 import 'package:observe/observe.dart'; |
10 | 10 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 return root; | 98 return root; |
99 } | 99 } |
100 | 100 |
101 /** | 101 /** |
102 * Sanitizer which does nothing. | 102 * Sanitizer which does nothing. |
103 */ | 103 */ |
104 class NullTreeSanitizer implements NodeTreeSanitizer { | 104 class NullTreeSanitizer implements NodeTreeSanitizer { |
105 void sanitizeTree(Node node) {} | 105 void sanitizeTree(Node node) {} |
106 } | 106 } |
107 | 107 |
108 unbindAll(node) { | 108 clearAllTemplates(node) { |
109 nodeBind(node).unbindAll(); | 109 if (isSemanticTemplate(node)) { |
| 110 templateBind(node).clear(); |
| 111 } |
110 for (var child = node.firstChild; child != null; child = child.nextNode) { | 112 for (var child = node.firstChild; child != null; child = child.nextNode) { |
111 unbindAll(child); | 113 clearAllTemplates(child); |
112 } | 114 } |
113 } | 115 } |
OLD | NEW |