the `label` element has an attribute "for", which points to an input element `label.for == ID` hyperscript scrubs the for attribute out of labels ```js h('label', {for: "someID"}, text) ```
Activity
gandhiShepard commentedon Apr 19, 2018
The correct JS attribute to use is
htmlFor. To correct the snippet above, write this:Read more: https://stackoverflow.com/questions/15750290/setting-the-html-label-for-attribute-in-javascript?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
kolbasik commentedon Apr 26, 2019
Or you can specify the
attrsproperty to tell hyperscript sets the following as attributes:But I would go with the suggestion above.