Closed des-des closed 7 years ago
Here is the failing test case
tag = '<input checked name="sad" type="checkbox">';
t.deepEqual(parseTag(tag), {
type: 'tag',
attrs: {
type: 'checkbox',
checked: 'checked', // This conforms to spec for boolean attributes
name: 'sad'
},
name: 'input',
voidElement: false,
children: []
});
With output
expected:
{ attrs: { checked: 'checked', name: 'sad', type: 'checkbox' }, children: [], name: 'input', type: 'tag', voidElement: false }
actual:
{ attrs: { '"sad"': 'type', checked: 'name' }, children: [], name: 'input', type: 'tag', voidElement: true }
Fixed in 2.0.1 with #14
@rayd I am getting a problem in a dependency (snabbdom-virtualize). I think it is being caused by the way this lib handles boolean attributes.
like
when this gets parsed we end up with an attribute name
text/javascript
which causes an error when I update the dom.