developit / developit/htm

different attribute handling in div/span etc. and svg

Offen
#240 6 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
9k
Forks
181
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I am using "htm" with "preact" binding

When I'm using code like the following

```
render(html`





`, document.body)
```

"htm" handles the ids differently:

* `

` and `` get an `id` with the value `"false"` while
* `` elements behave as expected (the first one gets no `id`, the second one an id with the value `id-4`)

Is that the expected behaviour? I've also tested other attributes, always with the same result...

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start by running the issue's htm and Preact reproduction in a browser and compare the generated attributes on div, span, and svg elements. Trace the attribute-handling path for HTML and SVG elements, then verify that falsy conditional values are handled consistently and that the reproduction produces the expected ids.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
frontend
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.