I'm ok to do that, since I think having a clean DOM is very important and
helps at a later time when trying to debug or fix issues.
That came at a cost of a check, for sure others can argument about this is
not PAYG, but my perception is that we should apply PAYG intelligently and
not just 100% of cases without think where it can fit or not depending on
other necessities and points of view. IOW, this makes us be smarter in how
we apply principles to see all grey tones, in opposite to try to go just
Black or White.

Thanks



El mié., 15 ene. 2020 a las 11:20, Harbs (<harbs.li...@gmail.com>) escribió:

> Currently when an element is added to a parent, the following is called:
>
> setClassName(computeFinalClassNames());
>
> Because there’s no check there to determine if a class name was actually
> set, you can end up with elements with empty class names like so: <div
> class="">, <br class=“”>.
>
> While this has no visual effect, it does clutter up the dom markup in the
> browser (and might have a non-zero effect on performance —  although this
> is likely minuscule).
>
> I’d like to get rid of the empty assignments. I can either do that in
> UIBase, or in the HTML package for those classes.
>
> My preference is to add it to UIBase —  both because I think it belongs
> there and because it’s going to be very messy adding it to subclasses. The
> code is in the middle of addedToParent.
>
> Thoughts?
> Harbs



-- 
Carlos Rovira
http://about.me/carlosrovira

Reply via email to