crysalead-js / dom-layer

Virtual DOM implementation.
MIT License
30 stars 1 forks source link

classList support? #42

Closed ghost closed 9 years ago

ghost commented 9 years ago

I saw your new changes, and noticed you are using classList for the specs. Why not use it for the hooks too? I know there are a common IE bugs, but that can be fixed. Example multiple classes in IE.

SVG works best on classList as I heard before, but is this hooks working without an issue for SVG?

You mentioned before a class / className issue for IE?

jails commented 9 years ago

I'm using classList in specs because it was simpler and specs doesn't require to be IE < 10 compatible. I'm not using it in the codebase because it's faster to batch all classes in one string and set the classes in one go, instead of multiple adds on classList.

And the issue if IE was setAttribute() must be done on "className" instead of "class" but it was a IE < 8 issue afaik. Now setAttribute("class", ...) should work on all recent browser.