purescript-virtual-dom
purescript-virtual-dom copied to clipboard
Class attribute is impossible
Both this:
vnode "nav.nav-bar" {} []
this:
vnode "nav" {class: "nav-bar"} []
and this:
vnode "nav" {"class": "nav-bar"} []
fail to create a nav
tag with a class
attribute, leaving a tag called nav.nav-bar
, no attributes, and no attributes respectively.
Unless I'm missing something, this is a gaping hole in the API.
Does className
work?
className
seems to work for classes. This ought to be documented in the readme.
That's just the normal name for the class attribute when using the DOM API. The first case nav.nav-bar
not working is definitely a bug though.