TimBeyer / html-to-vdom

Converts an HTML string into a virtual DOM
172 stars 41 forks source link

Transform hyphenated data attributes to valid dataset key names #13

Closed bregenspan closed 9 years ago

bregenspan commented 9 years ago

This fixes an error that occurs when attempting to create a virtual-dom tree from HTML containing data--prefixed attributes with hyphens in their names. Without this, the dataset passed in to virtual-dom has invalid names (e.g. element-uid instead of elementUid) and Node or the browser fails to set the dataset properties.

TimBeyer commented 9 years ago

Thanks, Ben. Will review this as soon as I have time!

TimBeyer commented 9 years ago

Released as v0.5.2

bregenspan commented 9 years ago

@TimBeyer Thanks for reviewing it + merging!