Beaker seems like the best candidate, given its support for javascript and its polyglot nature. My guess/hope is that this should be pretty simple...