jahilldev / component-elements

Create a custom element from any component with these tiny functions (2KB GZipped, ~1KB Brotli). Preact and React currently supported
MIT License
89 stars 7 forks source link

Fixed parse HTML causing broken hyphenated attributes #7

Closed jahilldev closed 2 years ago

jahilldev commented 2 years ago

When child HTML for a given components custom element contains attributes that are hyphentated (e.g, data-title), the parse functions were incorrectly removing the hyphenation, causing incorrect attribute keys to be applied once rendered.

This fixes that.