trying to run handlebars inside Adobe Air project #418

michapixel opened this Issue Jan 28, 2013 · 3 comments


None yet

2 participants


i'd like to use handlebars.js inside an adobe air project, but can only use it in a limited way, since the Air runtime restricts the use of eval() and Function calls etc.:
the solution provided is of no use for me, since i want a real offline project, ans serving the handlebars.js via a local file triggers the same warning/exception as directly including it.
a micro webserver might be a (quick and dirty) solution to this problem, but since i am definately not a js-guru, i thought i'd ask politely if someone sees a way to replace
"Function.apply(this, params)" from the actual source (line 1385) with something the Air-runtime doesn't see as a violation ...


Ok, seems i'm one step further now, but 5 steps back. I've (kinda) successfully built a bridge liek described in the above link, an i can compile simple things like {{title}} but trying to compile this example results in ... nothing. i mean {{name}} and {{hometown}} are fine, so is {{kids.length}} but the loop {{#kids}} etc. seems fail silently.

any ideas what that might cause?


I'm not familiar with the Air runtime or the restrictions that are placed on it. If dynamic code is restricted in that environment I'd recommend using precompiled templates rather than trying to compile them in the app.

In terms of the {{#kids}} iteration issue, does it work if you use {{#each kids}}?


Closing as this seems to be dead and I believe precompilation should resolve the issue.

@kpdecker kpdecker closed this May 31, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment