Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

I have discovered this little gem, allowing you to do the same in pure Javascript: https://github.com/leeoniya/domvm

The equivalent would be something like

  function() selected { return true }
  ["h2", {class: function() {if (selected()) {return "selected"}}}, "Hello"]
Not as clean, but still usable IMO


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: