crysalead-js / dom-layer

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

should use null for namespace #39

Closed ghost closed 9 years ago

ghost commented 9 years ago

This line here: https://github.com/crysalead-js/dom-layer/blob/master/dist/dom-layer.js#L442 I encountered some issues in the specs when you use '', but if I changed to null the problem was solved.

jails commented 9 years ago

What lead you to such conclusion ?

ghost commented 9 years ago

To figure out your bugs I'm testing different things, and re-searching. So I just saw what REACT had done, and was also reading on stackoverflow. Example: http://stackoverflow.com/questions/16672743/javascript-null-check

jails commented 9 years ago

Fair enough, since attributes allow only string values thought getAttribute() on an unexisting attribute returns an empty string but it actually returns null. So fixed in https://github.com/crysalead-js/dom-layer/commit/6c13abc2817453706b0ea2bddafa24246d76e198