Thursday, January 18, 2007

JavaScript evaluation with Rhino

OK, at this moment I can evaluate this snip of JavaScript code. I mean determine value of x or get a result of f() function from Java code :

var x = 'hello world !' ;
function a()
{
return 'a';
};
function f(x)
{
if(x>2)
{
return a();
}
else
{
return 'b';
}
}

But... it seems to be that there are no any browser objects ! It is mean that I need to implement in some way all this stuff : window.* document.* Ohh-nooo :)

No comments: