in reply to SpiderMonkey and JS
the js object must know about the page structure in order to be able to traverse the DOM and apply the getElementById to it. there should be a method of the SpiderMonkey object which does just that. By reading the docs I see the only way to load a particular page would be for you to document.location.href = that_page and eval that with the SpiderMonkey object,and only after that's finished , and will hopefully make a HTTP request(you should check that with ngrep for example) , will you be able to do anything with the DOM.
As an alternative and more DIY option I suggest you write a Firefox extension(XUL) which communicates through AJAX with a Perl script and automate your task that way , you'll be able to have complete control over what you're doing and instead of having to deal with the potential bugs of SpiderMonkey or it's counterpart CPAN module you'll only have to deal with Firefox bugs(which is pretty stable IMHO).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: SpiderMonkey and JS
by Anonymous Monk on May 01, 2009 at 19:32 UTC | |
by spx2 (Deacon) on May 01, 2009 at 22:37 UTC |