purescript-virtual-dom icon indicating copy to clipboard operation
purescript-virtual-dom copied to clipboard

Class attribute is impossible

Open alexchandel opened this issue 9 years ago • 3 comments

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.

alexchandel avatar Mar 12 '15 03:03 alexchandel

Does className work?

paf31 avatar Mar 12 '15 03:03 paf31

className seems to work for classes. This ought to be documented in the readme.

alexchandel avatar Mar 14 '15 02:03 alexchandel

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.

garyb avatar Mar 14 '15 02:03 garyb