Questions tagged [envjs]

EnvJS is a simulated JavaScript browser

EnvJS is an implementation of a client browser as a scripting environment. In other words, it is a simulated JavaScript browser that can be used for testing purposes. To use EnvJS, you must have a JavaScript engine, such as Rhino and V8, to name a few.

21 questions
10
votes
2 answers

nodejs or envjs - dynamic jquery tmpl

My current task is to generate and provide centralized templates for a particular DOM - for this example let's just say it's a form. Basically I'd like to take each form element (from the labels, to the inputs, to the div wrappers) and save them as…
AlienWebguy
  • 73,720
  • 16
  • 109
  • 137
9
votes
1 answer

Load a DOM and Execute javascript, server side, with .Net

I would like to load a DOM using a document (in string form) or a URL, and then Execute javascript functions (including jquery selectors) against it. This would be totally server side, in process, no client/browser. Basically I need to load the dom…
Brook
  • 5,759
  • 3
  • 29
  • 45
7
votes
3 answers

Python httplib and POST

I am currently working with a piece of code that has been written by somebody else. It uses httplib to make requests to server. It has all the data supplied in a correct format - for example message body, header values, etc. The problem is that each…
julx
  • 7,913
  • 5
  • 40
  • 82
6
votes
3 answers

jQuery templates on the server side

Has anyone tried to use jQuery templates (or any other JavaScript based templating) on the server side with something like env.js? I'm considering attempting it to see what benefits could be gained by being able to render identical templates on…
Matt Sheppard
  • 111,039
  • 46
  • 105
  • 128
4
votes
2 answers

Setting a relative window.location.href in envjs

I am using java to run Envjs in order to run javascript unit tests in Jasmine. This will allow me to run the tests without a browser and make it easier to integrate into Jenkins (a continuous integration build server). I have a LoadSpecRunner.js…
cedd
  • 1,561
  • 1
  • 16
  • 33
3
votes
1 answer

Using Env.js with Python

I am having a bit of difficulty getting Env.js working with my Python application. The documentation on the website states: develop bridges for running Envjs in Ruby, Python, and other host languages with the SpiderMonkey and V8 javascript…
Julio
  • 2,076
  • 3
  • 28
  • 56
3
votes
3 answers

Envjs and Rhino in a Java application - Where to find env.rhino.js?

I'm trying to run envjs and Rhino in a java application to render SVGs with D3.js. So far, I can evaluate smaller functions using Rhino but when it comes to setting up envjs, the problems begin. The most important one is that the only tutorial for…
padmalcom
  • 991
  • 3
  • 12
  • 27
3
votes
0 answers

rhino + env.rhino.js StackOverflowError on Android

I read reports of others successfully using env.rhino.js on Android. I also got rhino working fine in an Android app and executing simple scripts, passing arguments both ways between Java and JavaScript. However, when I try to use env.rhino.js, no…
gregko
  • 5,189
  • 7
  • 44
  • 71
2
votes
2 answers

Running JSLinux in Rhino

For the fun of it, I tried running JSLinux in Rhino using envjs and it doesn't seem to throw any errors, nor does it seem to work. As mentioned here: How do I locally host the webbrowser Virtual Machine here: http://bellard.org/jslinux/, I first…
buzypi
  • 1,492
  • 1
  • 12
  • 15
2
votes
1 answer

Testing JQuery UI autocomplete with Capybara + Env.js does not work (with Selenium it works)

I do an RSpec integration test of the JQuery UI autocomplete functionality by using Capybara. When using Selenium (+ Firefox) as the web driver for Capybara everything works as it should, but when switching to Env.js as driver my tests fail. Are…
Zardoz
  • 14,339
  • 21
  • 79
  • 126
2
votes
1 answer

Anchor element's pathname returns undefined in Rhino with env.js

I have run into an issue that I believe is rooted in the implementation of anchor tags in Rhino. Although I am utilizing env.js, I suspect perhaps I am not configuring something correctly. In particular, my issue occurs while I am attempting to…
joescii
  • 6,170
  • 1
  • 22
  • 32
2
votes
2 answers

Call javascript(jQuery/Envjs) from java code

I am trying to execute Javascript code from Java. Javascript code uses jquery so I prepend the jquery.js before my code. But it throws following exception, Exception in thread "main" javax.script.ScriptException:…
Sun
  • 53
  • 1
  • 5
1
vote
4 answers

EnvJS/Rhino, setTimeout() not working

I currently set up EnvJS on my system (installed from here). My end goal is to load a page let it's javascript process for a few seconds, and then read the dom to get the information of interest. However I can not get setTimeout() to work to save my…
Kenny Cason
  • 11,382
  • 9
  • 42
  • 71
1
vote
1 answer

Using javax.script or Rhino to run javascript in Java with browser context (e.g. envjs)?

I am trying to run Protovis javascript from a Java program using javax.script: ScriptEngineManager factory = new ScriptEngineManager(); ScriptEngine engine = factory.getEngineByName("JavaScript"); engine.eval(new…
Shane
  • 92,684
  • 33
  • 219
  • 216
1
vote
1 answer

Rhino command line execution gets killed - what could be the reason / how to debug

we have a Javascript test setup with Rhino + Envjs and CI server running Ubuntu. We're running our tests from the command line with the following: java -cp ext/js.jar:ext/jline.jar org.mozilla.javascript.tools.shell.Main -opt -1 -f run.js Now we…
Touko
  • 10,399
  • 14
  • 71
  • 101
1
2