Open
Description
I have a component which accepts data-
attributes like data-image-width
. Obviously this gets serialized as dataImageWidth
on the webc.attributes
object, but then if you run webc.renderAttributes(webc.attributes)
, the attribute ends up getting serialized as dataimagewidth
, losing the dashes. Here's a template which should reproduce it:
<!-- my-component.webc -->
<script webc:type="js" webc:root="override">
`<div ${webc.renderAttributes(webc.attributes)}></div>`
</script>
<!-- page.webc -->
<my-component data-image-width="100"></my-component>
Current output:
<div dataimagewidth="100"></div>
Desired output:
<div data-image-width="100"></div>
Metadata
Metadata
Assignees
Labels
No labels