https://developer.mozilla.org/en-US/docs/Web/API/Element/classList

classList should probably be used, when available. Basically, anything
except IE9.

- Josh

On Nov 26, 2016 4:54 AM, "Carlos Rovira" <carlosrov...@apache.org> wrote:

> Hi.
>
> with CSS class we need to insert and remove class without affect the rest
> of them. So I propose to introduce two methods:
>
> appendClassName (className:String):Boolean;
> removeClassName (className:String):Boolean;
>
> This methods will be based on RegExp to see if the className is already in
> the String or not and return a boolean true if the className was inserted
> or false if it's not (so the class was already there).
>
> I will do this in UIBase, but checking the hierarchy, I think this is
> something very close to HTML so maybe className manipulation should be in
> Element class?
>
> I'll be working on this in the meanwhile and always we can refactor to
> other place
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>

Reply via email to