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

I tried making a simple dynamic page and failed repeatedly by attempting to put seemingly innocuous javascript in { } blocks. A simple case such as { platforms.join(' ') } works fine as where { technologies.map(function(t) {return t}).join('|') } does not. Until this is either fixed or (all limitations and work-arounds) documented, I consider this unusable for any real project.


Looking at the generated code:

  (function(v) {
        try {
            v = d.technologies.map(d.function(d.t) {
                    d.return d.t
                } finally {
                    return !v && v !== 0 ? "" : v
                }
            }).call(d), ").join('|') }"].join("")
There's two problems: (1) prefixing keywords with 'd.' which may possibly be solved by skipping keywords or with(d){...} and (2) the ").join('|') }" code became data.




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

Search: