Open NHQ opened 7 years ago
The correct JS attribute to use is htmlFor
. To correct the snippet above, write this:
h('label', {htmlFor: "someID"}, text)
Or you can specify the attrs
property to tell hyperscript sets the following as attributes:
h('label', { attrs: { for: "someID" } }, text)
But I would go with the suggestion above.
the
label
element has an attribute "for", which points to an input elementlabel.for == ID
hyperscript scrubs the for attribute out of labels