Journal Gopal.V's Journal: Standalone Javascript: Breaking out of the browser
/usr/lib/firefox-1.0/run-mozilla.sh /usr/lib/firefox-1.0/xpcshell
This should give you something like
js> a = [42, "is" , "the" , "answer"]
42,is,the,answer
js> a.sort()
42,answer,is,the
You can run your javascript code like this and pretty much everything outside the DOM and Window stuff can be well tested. And lastly the ultimate javascript hack of all time - Object orientation.
function base() { }
base.prototype.myname = function () { return "I am base"; }
function derieved()
{
this.base = base;
this.base();
}
derieved.prototype = new base;
derieved.prototype.__myname = derieved.prototype.myname;
derieved.prototype.myname = function () { return "I am derieved"; }
print(new derieved().myname());
print(new derieved().__myname());
Standalone Javascript: Breaking out of the browser More Login
Standalone Javascript: Breaking out of the browser
Slashdot Top Deals