0

I am basically trying to do this However the problem here is that the javascript refers to "document" and other terms which can be used with the browser but which when being executed through rhino cause an error. What is (if any) a way around for this? I looked into envjs but I'm not sure it can be used to solve the above problem.If it can,can a link to the appropriate sources be provided?

Community
  • 1
  • 1
Ashwin
  • 1,102
  • 2
  • 9
  • 30
  • I think envjs should work, though in any situation like this (that is, trying to emulate a browser environment sufficiently well as to "fool" code that expects to run in a real browser) there may be all sorts of problems down the road. – Pointy Nov 15 '11 at 12:36
  • What are you trying to do? What's the nature of the javascript? Where are you getting it from? – Dave Newton Nov 15 '11 at 13:04
  • Trying to open and maintain an instance of Google Channel API using javascript embedded in java using rhino and envjs.....the script comes from the google web app engine servers. – Ashwin Nov 16 '11 at 04:37
  • And partly my own script (which indirectly needs the browser environment,indirectly in the sense that it uses the functions defined in the JavaScript from the Google servers. ) – Ashwin Nov 16 '11 at 04:50

0 Answers0