crysalead-js / dom-layer

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

issues with server side markup #66

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hi! Long time. I just want to mention that your server side markup got some missing things. If you render a select or select multiple, the output are not selected. Look at your test here: https://github.com/crysalead-js/dom-layer/blob/master/spec/node/patcher/attrs-spec.js#L238-L246

bar are selected here, but if you try to render it, bar are not selected. I had expected something like this server side: <option selected value="bar"> but your output <option value="bar">.

Same with defaultValue. It's not rendered properly.

jails commented 9 years ago

Hi, what is defaultValue ?

ghost commented 9 years ago

Hi. It was my typo. Should be "default value". As in checkbox and radio button.

When I wrote listing, I mean li values. Example

<ul>
  <li value="foo"></li>
</ul>

shouldn't that be

<ul>
  <li>Foo</li>
</ul>`
jails commented 9 years ago

Like I said in another issue, dom-layer "introduced" a fake "value" attribute for <select> & <textearea> to be able to have something more homogeneous for inputs so then can be managed the same way.

However for <li>, "value" is not a valid attribute (see https://jsfiddle.net/tvsfcL1t/).