Subj : Re: To execute javascript under linux console To : netscape.public.mozilla.jseng From : willknowit@163.com (Stefan Chang) Date : Sat Nov 08 2003 12:35 pm Brendan Eich wrote in message news:<3FAC2455.6020606@meer.net>... > Stefan Chang wrote: > > >sorry I am new to netscape javascript development. I want to execute > >the javascripts within webpages while navigating with a C/C++ or perl > >program. The OS is redhat9 with mozilla installed. > > > > > > What do you mean by "navigating with a C/C++ or perl program"? If you > mean controlling the browser by telling it to load URLs, you could use > xremote. If you mean embed the browser, you want to ask in the > mozilla.embedding newsgroup. > > >I have googled it ,one post said there is a developing environment > >bundled with KDE called kjsembed, but I have installed full KDE > >without finding it :( > > > > > > That sounds like nothing to do with Mozilla's JS engines, so you'd be in > the wrong group again if you want to use kjs. > > If you want to run JS scripts from the command line, you might try > xpcshell, which comes with Mozilla if memory serves. It's built under > http://lxr.mozilla.org/mozilla/source/js/src/xpconnect/shell/ and it > uses the Mozilla JS engine coded in C, which is the engine nicknamed > SpiderMonkey. Mozilla has a JS engine coded in Java, named Rhino. You > can run that too, if you have a Java runtime environment. From > xpcshell, you can script Mozilla's XPCOM components. From Rhino, you > can script Java classes. > > /be > > >Thanks so much for your help. > > > > thank you, and sorry for not expressing clearly. I want to develop a program under linux console environment to navigate webpages with javascript and javascript-controlled popup windows inside. So, there should not be mozilla running, only some kind of interpreter or engine, that's why I did not ask in mozilla.embedding. Rhino and spidermonkey could enable me to execute js scripts, while I just do not know how to behave like really navigating, not just parse the javascript codes and run it inside these js engines. .