Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: lib/src/html_cleaner.dart

Issue 13592003: add support for template repeat (Closed) Base URL: https://github.com/dart-lang/web-ui.git@master
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/src/html_cleaner.dart
diff --git a/lib/src/html_cleaner.dart b/lib/src/html_cleaner.dart
index 84ff3e2b41ab11b33c0922feb612ac4d95050aa7..bd41f3829b0eea90775f2749fe6f89b402fc346b 100644
--- a/lib/src/html_cleaner.dart
+++ b/lib/src/html_cleaner.dart
@@ -37,7 +37,8 @@ class _HtmlCleaner extends InfoVisitor {
// Hide all template elements. At the very least, we must do this for
// template attributes, such as `<td template if="cond">`.
- if (info.hasIfCondition && !info.isTemplateElement) {
+ if (info is TemplateInfo && !info.isTemplateElement &&
+ (info.hasCondition || info.isRepeat)) {
Siggi Cherem (dart-lang) 2013/04/05 20:09:24 why not info.hasLoop?
Jennifer Messerly 2013/04/05 20:34:36 wow, the comment is way out of date. I've fixed it
node.attributes['style'] = 'display:none';
}

Powered by Google App Engine
This is Rietveld 408576698