crysalead-js / dom-layer

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

selectedIndex should be skipped in htmlify #49

Closed ghost closed 9 years ago

ghost commented 9 years ago

selectedIndex are an property and as you stated before, it should be set with props. Shouldn't this then be avoided in .toHTML()?

And if the attribute value is true, correct html should be to set the value to '' ?

And simply ignore if it's an false value?

ghost commented 9 years ago

And if you are htmlify a boolean value, this will never be correct, or? Example checked. It's set as an property, but if an boolean and htmlify, it should become <checked> <checked>. In your solution it will only be true / false .

jails commented 9 years ago

selectedIndex is a property so there's no need to skip anything since the whole props is ignored from .toHTML(). And the dom-layer is not a property/attribute checker. You need to pass correct values to make it work. So for checked it's attrs: {"checked": "checked"}.