developit / htm

Hyperscript Tagged Markup: JSX alternative using standard tagged templates, with compiler support.
Apache License 2.0
8.64k stars 169 forks source link

Some event handler converts to boolean #232

Open abnerlee opened 1 year ago

abnerlee commented 1 year ago

Hi,

const h = (tag, props, ...children) => ({ tag, props, children });
const html = htm.bind(h);
const dom = html`<div onCompositionStart=${()=>{}} onClick=${()=>{}}>aaa</div>`

In props, the onCompositionStart becomes true. The expected behavior is that the value of onCompositionStart and onClick in props should both be Function