dominictarr/hyperscript — pull request #5 by Raynos (2013-04-05 01:15:30+00:00)
Title: Support dataset & document fragments

Check whether a key in the attributes hash starts with data- if
so then use the data-set module to set a dataset property on it.

Change isNode to check for nodeType & nodeName properties which
exist on all nodes including document fragments.

Dataset is hard to support. the `dataset` property exists everywhere but IE ( http://caniuse.com/dataset ). To get around it the [`"data-set"`][1] module is used which just returns the real one if it exists and will set properties on the real dataset if it exists.

If the real dataset does NOT exist like in IE9/10 then the only way you can read data-foo properties is to `require("data-set")(elem).foo` the dataset shim does not add `data-foo` attributes to the actual DOM node.

[1]: https://github.com/Colingo/data-set