Permalink
Browse files

Log if trying to add a CSS class twice to an element during debug bui…

…lds.
  • Loading branch information...
1 parent d7376e3 commit 98928dcdffde300e86d43efc6bc34e74caf94e80 @mikeabdullah mikeabdullah committed Jul 28, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 KSHTMLWriter.m
View
@@ -119,6 +119,13 @@ - (NSString *)currentElementClassName;
- (void)pushClassName:(NSString *)className;
{
+#ifdef DEBUG
+ if ([_classNames containsObject:className])
+ {
+ NSLog(@"Adding class \"%@\" to an element twice", className);
+ }
+#endif
+
[_classNames addObject:className];
}

0 comments on commit 98928dc

Please sign in to comment.