Open bitinn opened 9 years ago
Dataset has been removed, since data-* attribs are now supported through the attributes property (see https://github.com/marcelklehr/vdom-virtualize/commit/7c5846b75d30f37a15d24c268f86964c93266b68 and https://github.com/marcelklehr/vdom-virtualize/commit/e7dddc4fc039a702677946786936b51c0e442f70)
Other than that this pr looks good!
I added it back because html-to-vdom
has tests on them, especially for properties.dataset.foobar
, see these tests for example:
And from my research on this topic (I actually did read the commit and issue you posted), it appears dataset support isn't removed:
Could you take a look as well @TimBeyer ?
PS: I would like to find a test on dataset
in virtual-dom
repo, but there doesn't seem to be one, they only test for the patched real dom, so I am not sure if properties.dataset.foobar
is valid.
dataset doesn't work in all browsers (i.e. IE8 has problems), so that's why i removed it in favor of adding data-* attributes.
On one hand I don't have a problem with it because I use attributes
, on the other it means we should change test cases (and be slightly incompatible with html-to-vdom
, not a big deal).
In the latter case, could you check what else you would like to remove from or add to test cases?
https://github.com/bitinn/vdom-virtualize/blob/ci-test-cases/test/index.js
PS: I would like to remove that dataset special case from code as well, so no more confusion on this topic.
SVG should be tested, as well as the ie8 issues, namely style attribute(already done), data attributes, and img tags, as well as form imputs.
Sorry for not following up earlier, after spending some time on this I realize the tests are more difficult than I have originally thought, so I ended up writing my own test suite and implementation. Hopefully it's useful to vdom-virtualize as well:
https://github.com/bitinn/vdom-parser
I will keep this branch open for now.
This PR supersede #21, main change:
html-to-vdom
as possible)npm run dist
build command and.gitignore
file.You should be able to open the
test/index.html
and run test directly, or usenpm test
to run tests as phantomjs.Things still missing:
key
support.var html = ' <div></div>';
what's the expected output? (html-to-vdom
throw errors).