developit / developit/htm

Some event handler converts to boolean

Open
#232 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
9k
Forks
181
PR merge metrics
No merged PRs in 30d

Description

Hi,

```
const h = (tag, props, ...children) => ({ tag, props, children });
const html = htm.bind(h);
const dom = html`

{}} onClick=${()=>{}}>aaa
`
```

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

Contributor guide

Open the contributing guide

Research direction

Start by running the provided tagged-template reproduction and trace how event attributes are parsed into props. Done means both onCompositionStart and onClick remain Function values rather than being converted to booleans.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.