WebReflection / uhtml

A micro HTML/SVG render

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Object attribute support

abdolian opened this issue · comments

I need something like .dataset=${object} without data- prefix.

Input
<div .attr="${{foo: 1, 'foo-bar': 2}}"></div>

Output
<div foo="1" foo-bar="2"></div>

easy with custom elements ... you define a getter, and set an attribute per each object key/value pair ... otherwise, check uhtml-intents