xpcom and javascript

Tomeu Vizoso tomeu at tomeuvizoso.net
Thu Dec 13 05:05:40 EST 2007


On Thu, 2007-12-13 at 09:39 +0100, Christian Reichlin wrote:
> hi,
> 
> i'm trying to make an activity out of a javascript application. i load 
> the page into a hulahop webview-widget and i can access the dom with 
> xpcom to save the state to the journal. for restoring the state i need 
> to call a javascript function and i wasn't able to figure out how to do 
> this.
> if someone knows how to do this or if someone has another solution to 
> this problem it would be great.

Never did something like that, but I suggest implementing a XPCOM
Service in javascript, and calling that from python like we call any of
the built-in mozilla services.

A quick search in google offers this as an example:

http://groups.csail.mit.edu/uid/wiki/index.php?title=Chickenfoot_Coding_Conventions#Backend

Good luck,

Tomeu




More information about the Devel mailing list