developit / htm

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

Some event handler converts to boolean #232

Open abnerlee opened 2 years ago

abnerlee commented 2 years 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